aboutsummaryrefslogtreecommitdiffstats
path: root/common/PubnubBase.py
diff options
context:
space:
mode:
authorDevendra2014-04-23 21:35:06 +0530
committerDevendra2014-04-23 21:35:06 +0530
commitf7b89bfafae34fa22509c1d1c59d1284ec62c5df (patch)
tree2eeaf63f906ade16c82c86844e8f76b191b9ad6c /common/PubnubBase.py
parent1d97c69f186719fe007a4fa0033d39d9a68a4e43 (diff)
downloadpubnub-python-f7b89bfafae34fa22509c1d1c59d1284ec62c5df.tar.bz2
exception handling changes
Diffstat (limited to 'common/PubnubBase.py')
-rw-r--r--common/PubnubBase.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/common/PubnubBase.py b/common/PubnubBase.py
index 5863da9..9a20034 100644
--- a/common/PubnubBase.py
+++ b/common/PubnubBase.py
@@ -10,7 +10,7 @@ import sys
try:
from urllib.parse import quote
-except:
+except ImportError:
from urllib2 import quote
from base64 import urlsafe_b64encode
@@ -221,7 +221,7 @@ class PubnubBase(object):
"""
- message = self.encrypt(args['message'])
+ message = self.encrypt(message)
## Send Message
return self._request({"urlcomponents": [
@@ -282,15 +282,6 @@ class PubnubBase(object):
print(here_now['uuids'])
"""
- channel = str(args['channel'])
-
- callback = args['callback'] if 'callback' in args else None
- error = args['error'] if 'error' in args else None
-
- ## Fail if bad input.
- if not channel:
- raise Exception('Missing Channel')
- return False
## Get Presence Here Now
return self._request({"urlcomponents": [