Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

i take that back; allowNone now has to be specified in the constructor

  • Loading branch information...
commit 92d31c770688067c7a3f6b2fd61c66b0e3f6d5eb 1 parent f8e8197
@ssutch ssutch authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 pyapns/server.py
View
7 pyapns/server.py
@@ -241,12 +241,10 @@ def cancel_timeout(r):
class APNSServer(xmlrpc.XMLRPC):
def __init__(self):
- # self.allowNone = True
- # self.allow_none = True
self.app_ids = app_ids
self.use_date_time = True
self.useDateTime = True
- xmlrpc.XMLRPC.__init__(self, allow_none=True)
+ xmlrpc.XMLRPC.__init__(self, allowNone=True)
def apns_service(self, app_id):
if app_id not in app_ids:
@@ -274,7 +272,6 @@ def xmlrpc_provision(self, app_id, path_to_cert_or_cert, environment, timeout=15
if not app_id in self.app_ids:
# log.msg('provisioning ' + app_id + ' environment ' + environment)
self.app_ids[app_id] = APNSService(path_to_cert_or_cert, environment, timeout)
- return 'provisioned'
def xmlrpc_notify(self, app_id, token_or_token_list, aps_dict_or_list):
""" Sends push notifications to the Apple APNS server. Multiple
@@ -301,7 +298,7 @@ def _finish_err(r):
# that are made unsuccessfully, which twisted will try endlessly
# to reconnect to, we timeout and notifify the client
raise xmlrpc.Fault(500, 'Connection to the APNS server could not be made.')
- return d.addCallbacks(lambda r: 'sent', _finish_err)
+ return d.addCallbacks(lambda r: None, _finish_err)
def xmlrpc_feedback(self, app_id):
""" Queries the Apple APNS feedback server for inactive app tokens. Returns
Please sign in to comment.
Something went wrong with that request. Please try again.