Skip to content

Commit

Permalink
Improve compatibility with Python 2.6
Browse files Browse the repository at this point in the history
Keyword arguments for `decode` are only supported since 2.7
  • Loading branch information
tribut committed Jan 12, 2015
1 parent 6cb5823 commit 53102e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/potr/proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(self, versions=set()):
def parse(cls, data):
if not isinstance(data, bytes):
raise TypeError('can only parse bytes')
udata = data.decode('ascii', errors='replace')
udata = data.decode('ascii', 'replace')

versions = set()
if len(udata) > 0 and udata[0] == '?':
Expand Down

0 comments on commit 53102e7

Please sign in to comment.