aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Pubnub.py8
-rwxr-xr-xpython/examples/dev-console.py1
2 files changed, 6 insertions, 3 deletions
diff --git a/python/Pubnub.py b/python/Pubnub.py
index 64bc14b..7af2e92 100644
--- a/python/Pubnub.py
+++ b/python/Pubnub.py
@@ -237,8 +237,12 @@ class PubnubBase(object):
self.python_version = 2
self.pc = PubnubCrypto2()
else:
- self.python_version = 3
- self.pc = PubnubCrypto3()
+ if sys.version_info.major == 2:
+ self.python_version = 2
+ self.pc = PubnubCrypto2()
+ else:
+ self.python_version = 3
+ self.pc = PubnubCrypto3()
if not isinstance(self.uuid, str):
raise AttributeError("pres_uuid must be a string")
diff --git a/python/examples/dev-console.py b/python/examples/dev-console.py
index 33ec39f..08e08d9 100755
--- a/python/examples/dev-console.py
+++ b/python/examples/dev-console.py
@@ -10,7 +10,6 @@
## -----------------------------------
import sys
-from twisted.internet import reactor
sys.path.append('../')
sys.path.append('../../')
from Pubnub import Pubnub