summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-10-13 15:14:34 +0200
committermathieui <mathieui@mathieui.net>2012-10-13 15:14:34 +0200
commit1621aa9cfdc5249bb287b8df9fd2f227fd28ced3 (patch)
tree5a86f2c73afb5ffc3290d408308075887a8b21d9 /src
parent61bf29db8ef7741cf1f42ab0a8b65b098864742c (diff)
downloadpoezio-1621aa9cfdc5249bb287b8df9fd2f227fd28ced3.tar.gz
poezio-1621aa9cfdc5249bb287b8df9fd2f227fd28ced3.tar.bz2
poezio-1621aa9cfdc5249bb287b8df9fd2f227fd28ced3.tar.xz
poezio-1621aa9cfdc5249bb287b8df9fd2f227fd28ced3.zip
Add a “debug” attribute to Core
Diffstat (limited to 'src')
-rw-r--r--src/core.py1
-rw-r--r--src/poezio.py2
-rw-r--r--src/tabs.py1
3 files changed, 3 insertions, 1 deletions
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: