Refactored exception logging

This commit is contained in:
Ozzieisaacs
2020-12-12 08:11:00 +01:00
parent 1ae778d81e
commit b637a63e71
10 changed files with 27 additions and 51 deletions
+1 -4
View File
@@ -199,10 +199,7 @@ def getDrive(drive=None, gauth=None):
except RefreshError as e:
log.error("Google Drive error: %s", e)
except Exception as e:
if config.config_log_level == logger.logging.DEBUG:
log.exception(e)
else:
log.error(e)
log.debug_or_exception(e)
else:
# Initialize the saved creds
gauth.Authorize()