aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/PubnubBase.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/PubnubBase.py b/common/PubnubBase.py
index aa71577..585be70 100644
--- a/common/PubnubBase.py
+++ b/common/PubnubBase.py
@@ -66,8 +66,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")