[sulfur] use const.debug to determine if Sulfur is running in debug mode

This commit is contained in:
Fabio Erculiani
2009-07-12 21:26:42 +02:00
parent 44c2ae4a27
commit c81e1e1fa2
+2 -5
View File
@@ -133,11 +133,8 @@ class SulfurApplication(Controller, SulfurApplicationEventsMixin):
self.pty = pty.openpty()
self.output = fakeoutfile(self.pty[1])
self.input = fakeinfile(self.pty[1])
self.do_debug = False
if "--debug" in sys.argv:
self.do_debug = True
elif os.getenv('SULFUR_DEBUG') != None:
self.do_debug = True
self.do_debug = const.debug
if not self.do_debug:
sys.stdout = self.output
sys.stderr = self.output