Use UUID for seed

This commit is contained in:
allegroai 2024-05-20 15:56:06 +03:00
parent 0285a48c0c
commit 8b100f0ccb

View File

@ -11,6 +11,7 @@ from functools import reduce, partial
from getpass import getpass
from io import TextIOBase, StringIO
from time import time, sleep
from uuid import uuid4
if sys.platform == 'win32':
import msvcrt # noqa
@ -492,7 +493,7 @@ def get_user_inputs(args, parser, state, client):
a, parser._option_string_actions['--{}'.format(a.replace('_', '-'))].help))
# if no password was set, create a new random one
if not state.get('password'):
state['password'] = hashlib.sha256("seed me Seymour {}".format(time()).encode()).hexdigest()
state['password'] = hashlib.sha256("seed me {} {}".format(uuid4(), time()).encode()).hexdigest()
# store the requirements from the requirements.txt
# override previous requirements