1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-24 08:43:01 +00:00

Fix to regenerate bad APIKEY.

This commit is contained in:
Louis Vézina 2020-05-22 12:49:02 -04:00
parent 99f7145169
commit f4894f5341

View file

@ -42,7 +42,7 @@ configure_logging(settings.general.getboolean('debug') or args.debug)
import logging
# create random api_key if there's none in config.ini
if not settings.auth.apikey:
if not settings.auth.apikey or settings.auth.apikey.startswith("b'"):
from binascii import hexlify
settings.auth.apikey = hexlify(os.urandom(16)).decode()
with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle: