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

View file

@ -122,7 +122,11 @@ class Session():
env.CURRENT_ENV.getResource()) env.CURRENT_ENV.getResource())
self.stack.broadcastEvent( self.stack.broadcastEvent(
YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT)) YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))
try:
self.stack.loop() 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): def updateRoomList(self):
rooms = [] rooms = []