Skip to content

Commit 456d7de

Browse files
committed
Fix tox compatibility
closes gh-88
1 parent 30b54ef commit 456d7de

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tarantool/const.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-
import six
4+
import sys
55

66
#
77
IPROTO_CODE = 0x00
@@ -87,7 +87,7 @@
8787
# Default delay between attempts to reconnect (seconds)
8888
RECONNECT_DELAY = 0.1
8989

90-
if six.PY2:
90+
if sys.version_info.major == 2:
9191
ENCODING_DEFAULT = None
9292
else:
9393
ENCODING_DEFAULT = "utf-8"

tarantool/request.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
'''
66

77
import six
8+
import sys
89
import msgpack
910
import hashlib
1011

@@ -123,7 +124,7 @@ def sha1(values):
123124
return sha.digest()
124125

125126
def strxor(rhs, lhs):
126-
if six.PY2:
127+
if sys.version_info.major == 2:
127128
return "".join(chr(ord(x) ^ ord(y)) for x, y in zip(rhs, lhs))
128129

129130
return bytes([x ^ y for x, y in zip(rhs, lhs)])

0 commit comments

Comments
 (0)