From 2ca673c24cab0c7ca309d86ea4ad84f0e815a18c Mon Sep 17 00:00:00 2001 From: josdion Date: Fri, 17 Apr 2020 13:36:45 +0300 Subject: [PATCH] fix creation of the random api_key --- bazarr/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazarr/init.py b/bazarr/init.py index e966fb03a..1a6c2831b 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -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)