Skip to content

Commit c7582a7

Browse files
author
Jeff Ammons
committed
Conform all self.debug values to False
I really want to remove this dbg() mess.
1 parent e1d4816 commit c7582a7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

rtmbot/core.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ def __init__(self, config):
3131
level=logging.INFO,
3232
format='%(asctime)s %(message)s')
3333
logging.info(self.directory)
34-
if 'DEBUG' in self.config:
35-
self.debug = self.config.get('DEBUG')
36-
else:
37-
self.debug = False
34+
self.debug = self.config.get('DEBUG', False)
3835

3936
# initialize stateful fields
4037
self.last_ping = 0
@@ -132,7 +129,7 @@ def __init__(self, name, plugin_config=None):
132129
self.jobs = []
133130
self.module = __import__(name)
134131
self.module.config = plugin_config
135-
self.debug = self.module.config.get('DEBUG')
132+
self.debug = self.module.config.get('DEBUG', False)
136133
self.register_jobs()
137134
self.outputs = []
138135
if 'setup' in dir(self.module):
@@ -150,7 +147,7 @@ def register_jobs(self):
150147
def do(self, function_name, data):
151148
if function_name in dir(self.module):
152149
# this makes the plugin fail with stack trace in debug mode
153-
if not self.debug:
150+
if self.debug is False:
154151
try:
155152
eval("self.module." + function_name)(data)
156153
except:

0 commit comments

Comments
 (0)