From 0d734c872d443dd036098c1b5969f67f184d623d Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Thu, 27 Jul 2017 09:36:00 +0200 Subject: [PATCH] Fix log var assignment. --- cdist/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cdist/config.py b/cdist/config.py index 5fbb818e..e44dc7cb 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -124,6 +124,9 @@ class Config(object): def commandline(cls, args): """Configure remote system""" + # FIXME: Refactor relict - remove later + log = logging.getLogger("cdist") + # No new child process if only one host at a time. if args.parallel == 1: log.debug("Only 1 parallel process, doing it sequentially") @@ -134,6 +137,7 @@ class Config(object): del logging.getLogger().handlers[:] log_format = '%(levelname)s: [%(process)d]: %(message)s' logging.basicConfig(format=log_format) + log = logging.getLogger("cdist") if args.parallel: import signal @@ -141,9 +145,6 @@ class Config(object): signal.signal(signal.SIGTERM, mp_sig_handler) signal.signal(signal.SIGHUP, mp_sig_handler) - # FIXME: Refactor relict - remove later - log = logging.getLogger("cdist") - cls._check_and_prepare_args(args) failed_hosts = []