Catch AuthError
When authentication fails, yowsup throws and AuthError.
This commit is contained in:
parent
9e35017523
commit
467cc80b0d
|
@ -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 = []
|
||||||
|
|
Loading…
Reference in a new issue