Browse Source

Merge branch 'test' of http://192.168.136.99:3000/servers/ASJPush into ghl

guanhailong 2 years ago
parent
commit
4261ce5844
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Service/PushService.py

+ 2 - 0
Service/PushService.py

@@ -223,6 +223,7 @@ class PushObject:
         @param image: 推送图片链接
         @param image: 推送图片链接
         @return: None
         @return: None
         """
         """
+        logger = logging.getLogger('info')
         try:
         try:
             url = 'https://api.xmpush.xiaomi.com/v3/message/regid'
             url = 'https://api.xmpush.xiaomi.com/v3/message/regid'
             app_secret = XMPUSH_CONFIG[app_bundle_id]
             app_secret = XMPUSH_CONFIG[app_bundle_id]
@@ -244,6 +245,7 @@ class PushObject:
                 'Authorization': 'key={}'.format(app_secret)
                 'Authorization': 'key={}'.format(app_secret)
             }
             }
             response = requests.post(url, data=data, headers=headers)
             response = requests.post(url, data=data, headers=headers)
+            logger.info("小米推送返回值:{}".format(response.json()))
             assert response.status_code == 200
             assert response.status_code == 200
         except Exception as e:
         except Exception as e:
             return repr(e)
             return repr(e)