Merge remote branch 'tom/hacks'
This commit is contained in:
commit
f477ccf533
@ -109,9 +109,9 @@ class basexmpp(object):
|
||||
if hasattr(self.plugin[plugin], 'xep'):
|
||||
xep = "(XEP-%s) " % self.plugin[plugin].xep
|
||||
logging.debug("Loaded Plugin %s%s" % (xep, self.plugin[plugin].description))
|
||||
except Exception, e:
|
||||
logging.error("Unable to load plugin: %s" %(plugin) )
|
||||
logging.exception(e)
|
||||
except:
|
||||
logging.exception("Unable to load plugin: %s", plugin )
|
||||
|
||||
|
||||
def register_plugins(self):
|
||||
"""Initiates all plugins in the plugins/__init__.__all__"""
|
||||
|
@ -41,6 +41,7 @@ class Scheduler(object):
|
||||
def process(self, threaded=True):
|
||||
if threaded:
|
||||
self.thread = threading.Thread(name='shedulerprocess', target=self._process)
|
||||
self.thread.daemon = True
|
||||
self.thread.start()
|
||||
else:
|
||||
self._process()
|
||||
|
@ -306,11 +306,12 @@ class XMLStream(object):
|
||||
return True
|
||||
|
||||
def disconnect(self, reconnect=False):
|
||||
if not self.state.transition('connected','disconnected'):
|
||||
with self.state.transition_ctx('connected','disconnected') as locked:
|
||||
if not locked:
|
||||
logging.warning("Already disconnected.")
|
||||
return
|
||||
logging.debug("Disconnecting...")
|
||||
self.sendPriorityRaw(self.stream_footer)
|
||||
self.sendRaw(self.stream_footer)
|
||||
time.sleep(5)
|
||||
#send end of stream
|
||||
#wait for end of stream back
|
||||
|
Loading…
x
Reference in New Issue
Block a user