Skip to content

Commit 3e1f210

Browse files
committed
fixed sys.version_info for python < 2.7
1 parent e9d62b2 commit 3e1f210

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tarantool/response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __new__(cls, value):
2525
if isinstance(value, unicode):
2626
return super(field, cls).__new__(cls, value.encode("utf-8", "replace"))
2727

28-
if sys.version_info.major < 3 and isinstance(value, str):
28+
if sys.version_info[0] < 3 and isinstance(value, str):
2929
return super(field, cls).__new__(cls, value)
3030

3131
if isinstance(value, (bytearray, bytes)):
@@ -57,7 +57,7 @@ def __int__(self):
5757
raise ValueError("Unable to cast field to int: length must be 4 or 8 bytes, field length is %d"%len(self))
5858

5959

60-
if sys.version_info.major > 2:
60+
if sys.version_info[0] > 2:
6161
def __str__(self):
6262
'''\
6363
Cast filed to str

0 commit comments

Comments
 (0)