summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Logan <joshua.logan@eveco.re>2018-03-13 14:06:31 +0100
committerJoshua Logan <joshua.logan@eveco.re>2018-03-13 14:06:31 +0100
commit1d336337ffa6d9c1720d44ea7909410d238414ae (patch)
tree17bf74585ed2f5682d614ae463d3988d36b43f0a
parentca04fa76c1f2d13e33a20f007c302be637ebf317 (diff)
downloadpytz-git-1d336337ffa6d9c1720d44ea7909410d238414ae.tar.gz
Fix for versions <= 2.7
Non-named tuple before version Python2.7.
-rw-r--r--src/pytz/__init__.py2
-rw-r--r--src/pytz/tests/test_tzinfo.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pytz/__init__.py b/src/pytz/__init__.py
index 32ecdd6..f317f8a 100644
--- a/src/pytz/__init__.py
+++ b/src/pytz/__init__.py
@@ -37,7 +37,7 @@ __all__ = [
]
-if sys.version_info.major > 2: # Python 3.x
+if sys.version_info[0] > 2: # Python 3.x
# Python 3.x doesn't have unicode(), making writing code
# for Python 2.3 and Python 3.x a pain.
diff --git a/src/pytz/tests/test_tzinfo.py b/src/pytz/tests/test_tzinfo.py
index 94498bd..6ecb333 100644
--- a/src/pytz/tests/test_tzinfo.py
+++ b/src/pytz/tests/test_tzinfo.py
@@ -57,7 +57,7 @@ def prettydt(dt):
dt.tzname(), offset)
-if sys.version_info.major > 2:
+if sys.version_info[0] > 2:
# Python 3.x doesn't have unicode(), making writing code
# for Python 2.3 and Python 3.x a pain.
unicode = str