Skip to content

Commit

Permalink
Fix ZipFile bug in Python 3.6+
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel committed Dec 12, 2016
1 parent 74caf72 commit 592cf92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/io/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def file_path_to_url(path):

# ZipFile is not a context manager for <= 2.6
# must be tuple index here since 2.6 doesn't use namedtuple for version_info
if sys.version_info[1] <= 6:
if compat.PY2 and sys.version_info[1] <= 6:
@contextmanager
def ZipFile(*args, **kwargs):
with closing(zipfile.ZipFile(*args, **kwargs)) as zf:
Expand Down

0 comments on commit 592cf92

Please sign in to comment.