mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-10 05:26:10 +01:00
fix so success detected from new API
This commit is contained in:
parent
cd777f3b9c
commit
79d03307ad
1 changed files with 3 additions and 3 deletions
|
@ -166,9 +166,9 @@ def notifyViaFCM( devids, typ, target ):
|
||||||
response = urllib2.urlopen( req ).read()
|
response = urllib2.urlopen( req ).read()
|
||||||
asJson = json.loads( response )
|
asJson = json.loads( response )
|
||||||
|
|
||||||
if 'success' in asJson and 'failure' in asJson and len(devids) == asJson['success'] \
|
# not sure what the response format looks like to test for success....
|
||||||
and 0 == asJson['failure']:
|
if 'name' in asJson: # and len(asJson['name']) == len(devids):
|
||||||
print "OK; no failures"
|
print "OK; no failures: ", response
|
||||||
success = True
|
success = True
|
||||||
else:
|
else:
|
||||||
print "Errors: "
|
print "Errors: "
|
||||||
|
|
Loading…
Reference in a new issue