From a1a1647dd8e6d37ff52031154396773b4a76542f Mon Sep 17 00:00:00 2001 From: jreback Date: Sun, 19 Jan 2014 13:43:09 -0500 Subject: [PATCH] BUG: possible fsync error when filno is negative (GH5999) --- pandas/io/pytables.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index bc99417c67310..b49c1b94b32ac 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -568,7 +568,10 @@ def flush(self, fsync=False): if self._handle is not None: self._handle.flush() if fsync: - os.fsync(self._handle.fileno()) + try: + os.fsync(self._handle.fileno()) + except: + pass def get(self, key): """