mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 01:02:19 +00:00
Fix to regenerate bad APIKEY.
This commit is contained in:
parent
99f7145169
commit
f4894f5341
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ configure_logging(settings.general.getboolean('debug') or args.debug)
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
# create random api_key if there's none in config.ini
|
# 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
|
from binascii import hexlify
|
||||||
settings.auth.apikey = hexlify(os.urandom(16)).decode()
|
settings.auth.apikey = hexlify(os.urandom(16)).decode()
|
||||||
with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle:
|
with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle:
|
||||||
|
|
Loading…
Reference in a new issue