From f4894f53415d2280f8418166c9b76a79d0a4ddb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Fri, 22 May 2020 12:49:02 -0400 Subject: [PATCH] Fix to regenerate bad APIKEY. --- bazarr/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazarr/init.py b/bazarr/init.py index 3c15676d2..3de9e1a8d 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -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: