Little hack to cast str to int for rand seed
This commit is contained in:
parent
d39877b7fb
commit
cdb1dad534
@ -83,6 +83,8 @@ class Slate():
|
|||||||
|
|
||||||
def expand_vars(self, string, **kwargs):
|
def expand_vars(self, string, **kwargs):
|
||||||
if isinstance(string, str):
|
if isinstance(string, str):
|
||||||
|
if string == '{rand}':
|
||||||
|
return int(random.random()*99999999)
|
||||||
return string.format(**kwargs, rand=int(random.random()*99999999))
|
return string.format(**kwargs, rand=int(random.random()*99999999))
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user