Index: lnt/lnttool/create.py =================================================================== --- lnt/lnttool/create.py +++ lnt/lnttool/create.py @@ -114,13 +114,12 @@ LNT configuration. """ from .common import init_logger - import hashlib + import binascii import lnt.server.db.migrate import lnt.server.db.util import lnt.testing import logging import os - import random import sys init_logger(logging.INFO if show_sql else logging.WARNING, @@ -138,7 +137,7 @@ wsgi_path = os.path.join(basepath, wsgi) schemas_path = os.path.join(basepath, "schemas") secret_key = (secret_key or - hashlib.sha1(str(random.getrandbits(256))).hexdigest()) + binascii.hexlify(os.urandom(20)).decode('ascii')) os.mkdir(instance_path) os.mkdir(tmp_path)