{tmp} contains expanded path of $TMP

This commit is contained in:
Dominik Moritz Roth 2023-07-30 13:39:41 +02:00
parent 25e64774bb
commit a16f3889f6

View File

@ -104,9 +104,10 @@ class Slate():
def expand_vars(self, string, delta_desc='BASE', **kwargs):
if isinstance(string, str):
rand = int(random.random()*99999999)
tmp = os.path.expandvars('$TMP')
if string == '{rand}':
return rand
return string.format(delta_desc=delta_desc, **kwargs, rand=rand)
return string.format(delta_desc=delta_desc, **kwargs, rand=rand, tmp=tmp)
return string
def apply_nested(self, d, f):