c32f47aea657b887c12560a92d691c6fd7f6a311,homeassistant/components/notify/ios.py,iOSNotificationService,send_message,#iOSNotificationService#Any#,47

Before Change


                    _LOGGER.error(message)

            if req.status_code in (201, 429):
                rate_limits = req.json()["rateLimits"]
                resetsAt = dt_util.parse_datetime(rate_limits["resetsAt"])
                resetsAtTime = resetsAt - datetime.now(timezone.utc)
                rate_limit_msg = ("iOS push notification rate limits for %s: "
                                  "%d sent, %d allowed, %d errors, "
                                  "resets in %s")
                _LOGGER.info(rate_limit_msg,
                             ios.device_name_for_push_id(target),
                             rate_limits["successful"],
                             rate_limits["maximum"], rate_limits["errors"],
                             str(resetsAtTime).split(".")[0])

After Change


                else:
                    _LOGGER.error(message)
            else:
                log_rate_limits(target, req.json())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: c32f47aea657b887c12560a92d691c6fd7f6a311
Time: 2016-10-23
Author: me@robbiet.us
File Name: homeassistant/components/notify/ios.py
Class Name: iOSNotificationService
Method Name: send_message


Project Name: home-assistant/home-assistant
Commit Name: 626763a7c344235073d6831e54502f74fcd4365c
Time: 2016-10-23
Author: me@robbiet.us
File Name: homeassistant/components/notify/ios.py
Class Name: iOSNotificationService
Method Name: send_message


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: c4a0e6dc369e68a9747254c4ebe0d6ac04ac65bc
Time: 2019-04-04
Author: github@engelke.com
File Name: healthcare/api-client/fhir/fhir_resources_test.py
Class Name:
Method Name: test_CRUD_search_resource


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: c4a0e6dc369e68a9747254c4ebe0d6ac04ac65bc
Time: 2019-04-04
Author: github@engelke.com
File Name: healthcare/api-client/fhir/fhir_resources_test.py
Class Name:
Method Name: test_get_patient_everything