From 79d03307ad6968f07a1d3d8eda8390870e170845 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 1 Feb 2019 20:33:05 -0800 Subject: [PATCH] fix so success detected from new API --- xwords4/relay/scripts/fcm_loop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/relay/scripts/fcm_loop.py b/xwords4/relay/scripts/fcm_loop.py index 4947f3254..5e0578e43 100644 --- a/xwords4/relay/scripts/fcm_loop.py +++ b/xwords4/relay/scripts/fcm_loop.py @@ -166,9 +166,9 @@ def notifyViaFCM( devids, typ, target ): response = urllib2.urlopen( req ).read() asJson = json.loads( response ) - if 'success' in asJson and 'failure' in asJson and len(devids) == asJson['success'] \ - and 0 == asJson['failure']: - print "OK; no failures" + # not sure what the response format looks like to test for success.... + if 'name' in asJson: # and len(asJson['name']) == len(devids): + print "OK; no failures: ", response success = True else: print "Errors: "