From: achbed Date: Fri, 21 Nov 2014 05:42:35 +0000 (-0600) Subject: Fixed a few issues with setting up logging X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c045f7ac834228e26e262f5c626fb67932bc7f99;p=deefuzzer.git Fixed a few issues with setting up logging Signed-off-by: achbed --- diff --git a/deefuzzer/core.py b/deefuzzer/core.py index 9f401c5..af027f4 100644 --- a/deefuzzer/core.py +++ b/deefuzzer/core.py @@ -62,11 +62,14 @@ class DeeFuzzer(Thread): self.conf_file = conf_file self.conf = get_conf_dict(self.conf_file) + if not 'deefuzzer' in self.conf.keys(): + return + # Get the log setting first (if possible) - log_file = str(self.conf.pop('log', '')) + log_file = str(self.conf['deefuzzer'].pop('log', '')) log_dir = os.sep.join(log_file.split(os.sep)[:-1]) if not os.path.exists(log_dir) and log_dir: - os.makedirs(m3u_dir) + os.makedirs(log_dir) self.logger = Logger(log_file) for key in self.conf['deefuzzer'].keys():