From 6e67486e8e2333e6f7b0128df9bc4f1da8db2bfc Mon Sep 17 00:00:00 2001 From: Devendra Date: Mon, 16 Jun 2014 23:33:20 +0530 Subject: return json array with code and reason in sync mode error --- Pubnub.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Pubnub.py') diff --git a/Pubnub.py b/Pubnub.py index 18f1b38..5c19109 100644 --- a/Pubnub.py +++ b/Pubnub.py @@ -1410,6 +1410,9 @@ class Pubnub(PubnubCoreAsync): return {'message': resp_json['message'], 'payload': resp_json['payload']} + if response[1] == 0: + return [0, resp_json] + return resp_json def _request(self, request, callback=None, error=None, single=False, timeout=5): -- cgit v1.2.3