Skip to content

Commit

Permalink
FIX: do not try to close file if not yet opened
Browse files Browse the repository at this point in the history
  • Loading branch information
klauer committed Jun 9, 2016
1 parent 7325b16 commit 403be32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hxntools/handlers/xspress3.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ def open(self):

def close(self):
super(Xspress3HDF5Handler, self).close()
self._file.close()
self._file = None
if self._file is not None:
self._file.close()
self._file = None
self._dataset = None

@property
Expand Down

0 comments on commit 403be32

Please sign in to comment.