Merge pull request #936 from josdion/hermes

fix creation of the random api_key
This commit is contained in:
morpheus65535 2020-04-17 07:45:13 -04:00 committed by GitHub
commit 5767cae6b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ import logging
# create random api_key if there's none in config.ini
if not settings.auth.apikey:
from binascii import hexlify
settings.auth.apikey = str(hexlify(os.urandom(16)))
settings.auth.apikey = hexlify(os.urandom(16)).decode()
with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle:
settings.write(handle)