From 23229e205ba7e46e75aae1a98385a39aa3b5db4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 20 May 2020 15:09:39 -0400 Subject: [PATCH] WIP --- bazarr/init.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bazarr/init.py b/bazarr/init.py index 72d0feb06..3c15676d2 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -109,6 +109,15 @@ if settings.auth.type == 'form' and \ os.remove(os.path.normpath(os.path.join(args.config_dir, 'config', 'register.json'))) logging.info('BAZARR your login credentials have been migrated successfully and your password is now equal ' 'to your username. Please change it as soon as possible in settings.') +else: + if os.path.exists(os.path.normpath(os.path.join(args.config_dir, 'config', 'users.json'))): + try: + os.remove(os.path.normpath(os.path.join(args.config_dir, 'config', 'users.json'))) + os.remove(os.path.normpath(os.path.join(args.config_dir, 'config', 'roles.json'))) + os.remove(os.path.normpath(os.path.join(args.config_dir, 'config', 'register.json'))) + except: + logging.error("BAZARR cannot delete those file. Please do it manually: users.json, roles.json, " + "register.json") def init_binaries():