Add a “debug” attribute to Core
This commit is contained in:
parent
61bf29db8e
commit
1621aa9cfd
3 changed files with 3 additions and 1 deletions
|
@ -116,6 +116,7 @@ class Core(object):
|
||||||
self.xmpp.core = self
|
self.xmpp.core = self
|
||||||
roster.set_node(self.xmpp.client_roster)
|
roster.set_node(self.xmpp.client_roster)
|
||||||
self.paused = False
|
self.paused = False
|
||||||
|
self.debug = False
|
||||||
self.remote_fifo = None
|
self.remote_fifo = None
|
||||||
# a unique buffer used to store global informations
|
# a unique buffer used to store global informations
|
||||||
# that are displayed in almost all tabs, in an
|
# that are displayed in almost all tabs, in an
|
||||||
|
|
|
@ -32,6 +32,8 @@ def main():
|
||||||
logging.basicConfig(level=logging.CRITICAL)
|
logging.basicConfig(level=logging.CRITICAL)
|
||||||
cocore = singleton.Singleton(core.Core)
|
cocore = singleton.Singleton(core.Core)
|
||||||
signal.signal(signal.SIGHUP, cocore.sighup_handler) # ignore ctrl-c
|
signal.signal(signal.SIGHUP, cocore.sighup_handler) # ignore ctrl-c
|
||||||
|
if options.debug:
|
||||||
|
cocore.debug = True
|
||||||
cocore.start()
|
cocore.start()
|
||||||
try:
|
try:
|
||||||
if not cocore.xmpp.start(): # Connect to remote server
|
if not cocore.xmpp.start(): # Connect to remote server
|
||||||
|
|
|
@ -122,7 +122,6 @@ class Tab(object):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def nb(self):
|
def nb(self):
|
||||||
log.debug("COUCOU TABS")
|
|
||||||
for index, tab in enumerate(self.core.tabs):
|
for index, tab in enumerate(self.core.tabs):
|
||||||
log.debug("%s", tab.__class__)
|
log.debug("%s", tab.__class__)
|
||||||
if tab == self:
|
if tab == self:
|
||||||
|
|
Loading…
Reference in a new issue