summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemato/compression.py4
-rw-r--r--tests/testutil.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/gemato/compression.py b/gemato/compression.py
index be1471a..f3854fb 100644
--- a/gemato/compression.py
+++ b/gemato/compression.py
@@ -8,7 +8,7 @@ import io
import os.path
import sys
-if sys.version_info >= (3, 3):
+if sys.hexversion >= 0x03030000:
import bz2
else:
# older bz2 module versions do not handle multiple streams correctly
@@ -45,7 +45,7 @@ def open_compressed_file(suffix, f, mode='rb'):
if suffix == "gz":
# work-around the deficiency in GzipFile class in py<3.3 causing
# it to break with TextIOWrapper
- if sys.version_info < (3, 3):
+ if sys.hexversion < 0x03030000:
class FixedGzipFile(gzip.GzipFile):
def read1(self, *args, **kwargs):
return self.read(*args, **kwargs)
diff --git a/tests/testutil.py b/tests/testutil.py
index 89feb3c..2a002c1 100644
--- a/tests/testutil.py
+++ b/tests/testutil.py
@@ -14,7 +14,7 @@ import unittest
class LoggingTestCase(unittest.TestCase):
def setUp(self):
- if sys.version_info < (3,):
+ if sys.hexversion < 0x03000000:
self.log = io.BytesIO()
else:
self.log = io.StringIO()