Skip to content

Commit 51de3c6

Browse files
committed
Merge pull request #6004 from jreback/pytables_fsync
BUG: possible fsync error when filno is negative (GH5999)
2 parents bf2ca40 + a1a1647 commit 51de3c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/io/pytables.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,10 @@ def flush(self, fsync=False):
568568
if self._handle is not None:
569569
self._handle.flush()
570570
if fsync:
571-
os.fsync(self._handle.fileno())
571+
try:
572+
os.fsync(self._handle.fileno())
573+
except:
574+
pass
572575

573576
def get(self, key):
574577
"""

0 commit comments

Comments
 (0)