Skip to content

Commit a0b3f75

Browse files
committed
Merge pull request #11 from Volshebnyi/master
Fixed Schema._pack_value_int call
2 parents 5a7cf4a + 3e1f210 commit a0b3f75

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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

src/tarantool/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
### pylint: disable=C0301,W0105,W0401,W0614
33
'''
4-
This module provides :class:`~tarantool.schema.Schema` class.
4+
This module provides :class:`~tarantool.schema.Schema` class.
55
It is a Tarantool schema description.
66
'''
77

@@ -245,7 +245,7 @@ def pack_value(self, value, cast_to = None):
245245
if value > 4294967295:
246246
return self._pack_value_int64(value)
247247
else:
248-
return self.pack_value_int(value)
248+
return self._pack_value_int(value)
249249
elif isinstance(value, long):
250250
return self._pack_value_int64(value)
251251
else:

0 commit comments

Comments
 (0)