Skip to content

Commit 48a7c7f

Browse files
committed
Removed some compatibility code for Python 2.6
1 parent bd6ab7a commit 48a7c7f

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

rsa/_compat.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ def byte_literal(s):
6464

6565
b = byte_literal
6666

67-
try:
68-
# Python 2.6 or higher.
69-
bytes_type = bytes
70-
except NameError:
71-
# Python 2.5
72-
bytes_type = str
73-
7467
# To avoid calling b() multiple times in tight loops.
7568
ZERO_BYTE = b('\x00')
7669
EMPTY_BYTE = b('')
@@ -85,7 +78,7 @@ def is_bytes(obj):
8578
:returns:
8679
``True`` if ``value`` is a byte string; ``False`` otherwise.
8780
"""
88-
return isinstance(obj, bytes_type)
81+
return isinstance(obj, bytes)
8982

9083

9184
def is_integer(obj):

0 commit comments

Comments
 (0)