From c81e1e1fa21f5cfbe3898e4e5d6f887184cabb90 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 12 Jul 2009 21:26:42 +0200 Subject: [PATCH] [sulfur] use const.debug to determine if Sulfur is running in debug mode --- sulfur/src/sulfur/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sulfur/src/sulfur/__init__.py b/sulfur/src/sulfur/__init__.py index 6d5717df1..462467a26 100644 --- a/sulfur/src/sulfur/__init__.py +++ b/sulfur/src/sulfur/__init__.py @@ -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