Skip to content

Commit 430567b

Browse files
committed
BUG: unclosed file handle in mmap
1 parent 811b9d0 commit 430567b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/io/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,8 @@ def get_handle(
535535
try:
536536
wrapped = _MMapWrapper(f)
537537
f.close()
538+
handles.remove(f)
539+
handles.append(wrapped)
538540
f = wrapped
539541
except Exception:
540542
# we catch any errors that may have occurred

0 commit comments

Comments
 (0)