Catch TypeError thrown when password incorrectly formatted
This commit is contained in:
parent
83f499b81d
commit
0ecc89d270
|
@ -121,8 +121,12 @@ class Session():
|
|||
YowConstants.DOMAIN)
|
||||
self.stack.setProp(YowCoderLayer.PROP_RESOURCE,
|
||||
env.CURRENT_ENV.getResource())
|
||||
self.stack.broadcastEvent(
|
||||
YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))
|
||||
try:
|
||||
self.stack.broadcastEvent(
|
||||
YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))
|
||||
except TypeError as e: # Occurs when password is not correctly formated
|
||||
self.logger.debug("Auth error -> user: %s; details: %s;",
|
||||
self.user, e)
|
||||
try:
|
||||
self.stack.loop()
|
||||
except AuthError as e: # For some reason Yowsup throws an exception
|
||||
|
|
|
@ -51,7 +51,7 @@ parser.add_argument('-j', type=str, required=True)
|
|||
|
||||
args, unknown = parser.parse_known_args()
|
||||
|
||||
YowConstatns.PATH_STORAGE='/var/lib/spectrum/' + args.j
|
||||
YowConstants.PATH_STORAGE='/var/lib/spectrum2/' + args.j
|
||||
# Logging
|
||||
logging.basicConfig( \
|
||||
format = "%(asctime)-15s %(levelname)s %(name)s: %(message)s", \
|
||||
|
|
Loading…
Reference in a new issue