From 5d6a3e1356182663b03d62f9258d38459d49017e Mon Sep 17 00:00:00 2001 From: Devendra Date: Fri, 18 Apr 2014 01:23:19 +0530 Subject: fixing wrong version detection with python 2.7 --- common/PubnubBase.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'common') 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") -- cgit v1.2.3