jleclanche/django-push-notifications — pull request #96 by arthurprs (2014-10-07 19:14:31+00:00)
Title: Decoupled _gcm_send error handling and other minor things

The first commit is just two very small cleanups for APNS:
- removed unnecessary return statements (_apns_send don't return anything)
- removed redundant error checking (_apns_check_errors is called inside _apns_check_errors)

Second
- Decoupled _gcm_send error handling and adjusted tests accordingly. The code looks better and allow proper error handling. It'll also allow better tests in the future. Example: testing error handling.

- Exposed the time_to_live parameter to gcm_send_bulk_message function, which I missed in the last PR.

- Fix return value when registration_ids > GCM_MAX_RECIPIENTS. It's broken since error handling was implemented for bulk/json responses as the return type changed from string to dict.

Third
- handle timeout on python 3