log error when migrating #850 (#1768)

Can't display debug logging until the config is loaded to enable debugging!
So log as error to get details of the migration fault.
This commit is contained in:
Clinton Hall 2020-08-26 20:27:38 +12:00 committed by GitHub
commit 2dfdc69487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,7 +127,7 @@ class ConfigObj(configobj.ConfigObj, Section):
shutil.copyfile(core.CONFIG_SPEC_FILE, core.CONFIG_FILE)
CFG_OLD = config(core.CONFIG_FILE)
except Exception as error:
logger.debug('Error {msg} when copying to .cfg'.format(msg=error))
logger.error('Error {msg} when copying to .cfg'.format(msg=error))
try:
# check for autoProcessMedia.cfg.spec and create if it does not exist
@ -135,7 +135,7 @@ class ConfigObj(configobj.ConfigObj, Section):
shutil.copyfile(core.CONFIG_FILE, core.CONFIG_SPEC_FILE)
CFG_NEW = config(core.CONFIG_SPEC_FILE)
except Exception as error:
logger.debug('Error {msg} when copying to .spec'.format(msg=error))
logger.error('Error {msg} when copying to .spec'.format(msg=error))
# check for autoProcessMedia.cfg and autoProcessMedia.cfg.spec and if they don't exist return and fail
if CFG_NEW is None or CFG_OLD is None: