Skip to content

Commit

Permalink
fix 'IO.close'
Browse files Browse the repository at this point in the history
  • Loading branch information
WAAutoMaton committed Dec 4, 2017
1 parent 791a912 commit fc87d6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cyaron/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ def close(self):
deleted = True
except OSError:
pass
self.input_file.close()
self.output_file.close()
if isinstance(self.input_file, IOBase):
self.input_file.close()
if isinstance(self.output_file, IOBase):
self.output_file.close()
if not deleted:
self.__del_files()
self.__closed = True
Expand Down

0 comments on commit fc87d6e

Please sign in to comment.