Catch AuthError

When authentication fails, yowsup throws and AuthError.
This commit is contained in:
moyamo 2015-02-27 17:40:34 +02:00
parent 9e35017523
commit 467cc80b0d
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,11 @@ class Session():
env.CURRENT_ENV.getResource())
self.stack.broadcastEvent(
YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))
self.stack.loop()
try:
self.stack.loop()
except AuthError as e: # For some reason Yowsup throws an exception
self.logger.debug("Auth error -> user: %s; details: %s;",
self.user, e)
def updateRoomList(self):
rooms = []