Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

let custom args be passed into the payload directly as args to Payload

  -- a dictionary can still be passed in: Payload(**my_dict) instead of Payload(custom=my_dict)
  • Loading branch information...
commit 33b8911ed8ec5c8ad9459db2fb32916ebd87e97a 1 parent 584843f
@dound authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 apns.py
View
4 apns.py
@@ -167,12 +167,12 @@ def __init__(self):
class Payload(object):
"""A class representing an APNs message payload"""
- def __init__(self, alert=None, badge=None, sound=None, custom={}):
+ def __init__(self, alert=None, badge=None, sound=None, **kwargs):
super(Payload, self).__init__()
self.alert = alert
self.badge = badge
self.sound = sound
- self.custom = custom
+ self.custom = kwargs
self._check_size()
def dict(self):
Please sign in to comment.
Something went wrong with that request. Please try again.