Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tarantool/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __new__(cls, value):
if isinstance(value, unicode):
return super(field, cls).__new__(cls, value.encode("utf-8", "replace"))

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

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


if sys.version_info.major > 2:
if sys.version_info[0] > 2:
def __str__(self):
'''\
Cast filed to str
Expand Down
4 changes: 2 additions & 2 deletions src/tarantool/schema.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
### pylint: disable=C0301,W0105,W0401,W0614
'''
This module provides :class:`~tarantool.schema.Schema` class.
This module provides :class:`~tarantool.schema.Schema` class.
It is a Tarantool schema description.
'''

Expand Down Expand Up @@ -245,7 +245,7 @@ def pack_value(self, value, cast_to = None):
if value > 4294967295:
return self._pack_value_int64(value)
else:
return self.pack_value_int(value)
return self._pack_value_int(value)
elif isinstance(value, long):
return self._pack_value_int64(value)
else:
Expand Down