Skip to content

Commit 9608b89

Browse files
committed
When 202, json load response
1 parent e5dff34 commit 9608b89

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pusher/http.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ def make_query_string(params):
4242
return '&'.join(map('='.join, sorted(params.items(), key=lambda x: x[0])))
4343

4444
def process_response(status, body):
45-
if status == 200:
45+
if status == 200 or status == 202:
4646
return json.loads(body)
47-
if status == 202:
48-
return True
4947
elif status == 400:
5048
raise PusherBadRequest(body)
5149
elif status == 401:

pusher/pusher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def notification_client(self):
270270
return self._notification_client
271271

272272
def notify(self, interest, notification):
273-
self._notification_client.notify(interest, notification)
273+
return self._notification_client.notify(interest, notification)
274274

275275
def _data_to_string(self, data):
276276
if isinstance(data, six.string_types):

0 commit comments

Comments
 (0)