From 5773472eebaf8cd5735bf56542764012a016300d Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Sun, 13 Jul 2014 06:58:46 +0930 Subject: [PATCH] Make log dir before creating pid. Fixes #482 --- nzbtomedia/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nzbtomedia/__init__.py b/nzbtomedia/__init__.py index ffcbf3f5..5a780ba7 100644 --- a/nzbtomedia/__init__.py +++ b/nzbtomedia/__init__.py @@ -201,6 +201,9 @@ def initialize(section=None): if __INITIALIZED__: return False + if not makeDir(LOG_DIR): + print("!!! No log folder, logging to screen only!") + MYAPP = RunningProcess() while MYAPP.alreadyrunning(): print("!!! Waiting for existing session to end!") @@ -231,9 +234,6 @@ def initialize(section=None): else: sys.exit(1) - if not makeDir(LOG_DIR): - print("!!! No log folder, logging to screen only!") - # init logging logger.ntm_log_instance.initLogging()