From 1621aa9cfdc5249bb287b8df9fd2f227fd28ced3 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 13 Oct 2012 15:14:34 +0200 Subject: =?UTF-8?q?Add=20a=20=E2=80=9Cdebug=E2=80=9D=20attribute=20to=20Co?= =?UTF-8?q?re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.py | 1 + src/poezio.py | 2 ++ src/tabs.py | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core.py b/src/core.py index 29ba477a..c6d7d557 100644 --- a/src/core.py +++ b/src/core.py @@ -116,6 +116,7 @@ class Core(object): self.xmpp.core = self roster.set_node(self.xmpp.client_roster) self.paused = False + self.debug = False self.remote_fifo = None # a unique buffer used to store global informations # that are displayed in almost all tabs, in an diff --git a/src/poezio.py b/src/poezio.py index c013883c..258a25e4 100644 --- a/src/poezio.py +++ b/src/poezio.py @@ -32,6 +32,8 @@ def main(): logging.basicConfig(level=logging.CRITICAL) cocore = singleton.Singleton(core.Core) signal.signal(signal.SIGHUP, cocore.sighup_handler) # ignore ctrl-c + if options.debug: + cocore.debug = True cocore.start() try: if not cocore.xmpp.start(): # Connect to remote server diff --git a/src/tabs.py b/src/tabs.py index 83e58695..27f79d9b 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -122,7 +122,6 @@ class Tab(object): @property def nb(self): - log.debug("COUCOU TABS") for index, tab in enumerate(self.core.tabs): log.debug("%s", tab.__class__) if tab == self: -- cgit v1.2.3