Little hack to cast str to int for rand seed

This commit is contained in:
Dominik Moritz Roth 2023-07-07 16:02:45 +02:00
parent d39877b7fb
commit cdb1dad534

View File

@ -83,6 +83,8 @@ class Slate():
def expand_vars(self, string, **kwargs):
if isinstance(string, str):
if string == '{rand}':
return int(random.random()*99999999)
return string.format(**kwargs, rand=int(random.random()*99999999))
return string