Prevent None callback from causing crashes
This commit is contained in:
parent
026f21f43e
commit
dbf4a477ec
|
@ -304,6 +304,7 @@ class YowsupApp(object):
|
||||||
iq = GetSyncIqProtocolEntity(contacts, mode, context)
|
iq = GetSyncIqProtocolEntity(contacts, mode, context)
|
||||||
def onSuccess(response, request):
|
def onSuccess(response, request):
|
||||||
# Remove leading plus
|
# Remove leading plus
|
||||||
|
if success is not None:
|
||||||
existing = [s[1:] for s in response.inNumbers.keys()]
|
existing = [s[1:] for s in response.inNumbers.keys()]
|
||||||
nonexisting = [s[1:] for s in response.outNumbers.keys()]
|
nonexisting = [s[1:] for s in response.outNumbers.keys()]
|
||||||
invalid = [s[1:] for s in response.invalidNumbers]
|
invalid = [s[1:] for s in response.invalidNumbers]
|
||||||
|
@ -324,6 +325,7 @@ class YowsupApp(object):
|
||||||
"""
|
"""
|
||||||
iq = GetStatusesIqProtocolEntity([c + '@s.whatsapp.net' for c in contacts])
|
iq = GetStatusesIqProtocolEntity([c + '@s.whatsapp.net' for c in contacts])
|
||||||
def onSuccess(response, request):
|
def onSuccess(response, request):
|
||||||
|
if success is not None:
|
||||||
self.logger.debug("Received Statuses %s", response)
|
self.logger.debug("Received Statuses %s", response)
|
||||||
s = {}
|
s = {}
|
||||||
for k, v in response.statuses.iteritems():
|
for k, v in response.statuses.iteritems():
|
||||||
|
|
Loading…
Reference in a new issue