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)
|
||||
def onSuccess(response, request):
|
||||
# Remove leading plus
|
||||
if success is not None:
|
||||
existing = [s[1:] for s in response.inNumbers.keys()]
|
||||
nonexisting = [s[1:] for s in response.outNumbers.keys()]
|
||||
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])
|
||||
def onSuccess(response, request):
|
||||
if success is not None:
|
||||
self.logger.debug("Received Statuses %s", response)
|
||||
s = {}
|
||||
for k, v in response.statuses.iteritems():
|
||||
|
|
Loading…
Reference in a new issue