From 52e7aa2320308b49cbab96bcb592f170b15c6bb9 Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 3 Apr 2014 20:08:08 -0700 Subject: [PATCH] Added error message for missing config files --- nzbToMedia.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nzbToMedia.py b/nzbToMedia.py index 4554c6a2..2ce69185 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -340,6 +340,7 @@ def process(nzbDir, inputName=None, status=0, clientAgent='manual', download_id= return -1 ######################################################################################################################## + # run migrate to convert old cfg to new style cfg plus fix any cfg missing values/options. if migratecfg().migrate(): # check to write settings from nzbGet UI to autoProcessMedia.cfg. @@ -347,12 +348,14 @@ if migratecfg().migrate(): migratecfg().addnzbget() nzbtomedia_configure_logging(config.LOG_FILE) - Logger = logging.getLogger(__name__) + + Logger = logging.getLogger() Logger.info("====================") # Seperate old from new log Logger.info("nzbToMedia %s", config.NZBTOMEDIA_VERSION) Logger.info("MAIN: Loading config from %s", config.CONFIG_FILE) else: + print("Unable to find " + config.CONFIG_FILE + " or " + config.SAMPLE_CONFIG_FILE) sys.exit(-1) # setup categories