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