Skip to content

Commit

Permalink
Accept bytes filenames in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
natezb authored Jan 19, 2017
1 parent 3e54b22 commit 7d7a2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2672,7 +2672,7 @@ def _parse_xtime(flag, data, pos, basetime=None):
def is_filelike(obj):
"""Filename or file object?
"""
if isinstance(obj, str) or isinstance(obj, unicode):
if isinstance(obj, (bytes, unicode)):
return False
res = True
for a in ('read', 'tell', 'seek'):
Expand Down

0 comments on commit 7d7a2cb

Please sign in to comment.