Skip to content

Commit 805739e

Browse files
committed
implement closed attribute for PY2
1 parent b5fc769 commit 805739e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/io/common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,13 @@ def __init__(self, file, mode, compression=zipfile.ZIP_DEFLATED, **kwargs):
445445
def write(self, data):
446446
super(BytesZipFile, self).writestr(self.filename, data)
447447

448+
@property
449+
def closed(self):
450+
if compat.PY2:
451+
return self.fp is None
452+
else:
453+
return super(BytesZipFile, self).closed
454+
448455

449456
class MMapWrapper(BaseIterator):
450457
"""

0 commit comments

Comments
 (0)