matteomattei / PySquashfsImage

Python library to read Squashfs image files.
GNU General Public License v3.0
50 stars 20 forks source link

Do not throw on duplicate close calls #29

Open mxmlnkn opened 1 week ago

mxmlnkn commented 1 week ago

Especially because there is no closed test method, it should be possible to call close multiple times. Currently, this throws an exception:

PySquashfsImage/__init__.py", line 131, in close
    self._fd.close()
    ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'close'