aboutsummaryrefslogtreecommitdiffstats
path: root/Pubnub.py
diff options
context:
space:
mode:
authorDevendra2015-06-12 00:47:08 +0530
committerDevendra2015-06-12 00:47:08 +0530
commit9d4c28c33efb7a546c96cafc5debf920de1d9931 (patch)
tree6093d9f6b2ece22f66b375bcd952d2abcdf1425d /Pubnub.py
parentd0a49a0f9c81458b6c85ba9afabc515e46fd8989 (diff)
parent437124952fd01eac9e8ccc132197ea6f18fdea56 (diff)
downloadpubnub-python-9d4c28c33efb7a546c96cafc5debf920de1d9931.tar.bz2
Merge branch 'pam_demo' into develop
Diffstat (limited to 'Pubnub.py')
-rw-r--r--Pubnub.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/Pubnub.py b/Pubnub.py
index c3bd2fa..30916b9 100644
--- a/Pubnub.py
+++ b/Pubnub.py
@@ -991,6 +991,7 @@ class PubnubBase(object):
if ("urlparams" in request):
url = url + '?' + "&".join([x + "=" + str(y) for x, y in request[
"urlparams"].items() if y is not None and len(str(y)) > 0])
+ #print(url)
return url
def _channel_registry(self, url=None, params=None, callback=None, error=None):
@@ -1684,11 +1685,17 @@ class PubnubCoreAsync(PubnubBase):
if channel_list is None:
for ch in self.subscriptions:
chobj = self.subscriptions[ch]
- _invoke(chobj['error'], error)
+ try:
+ _invoke(chobj['error'], error, ch)
+ except TypeError:
+ _invoke(chobj['error'], error)
else:
for ch in channel_list:
chobj = self.subscriptions[ch]
- _invoke(chobj['error'], error)
+ try:
+ _invoke(chobj['error'], error, ch)
+ except TypeError:
+ _invoke(chobj['error'], error)
def _get_channel():
for ch in self.subscriptions:
@@ -1895,7 +1902,7 @@ class PubnubCoreAsync(PubnubBase):
self.leave_channel(channel=channel)
# remove channel from STATE
- STATE.pop(channel, None)
+ self.STATE.pop(channel, None)
self.CONNECT()
@@ -2107,6 +2114,8 @@ def _requests_request(url, timeout=5):
except requests.exceptions.Timeout as error:
msg = str(error)
return (json.dumps(msg), 0)
+ #print (resp.text)
+ #print (resp.status_code)
return (resp.text, resp.status_code)