openpreserve / fido

Format Identification for Digital Objects (FIDO) is a Python command-line tool to identify the file formats of digital objects. It is designed for simple integration into automated work-flows.
http://openpreservation.org/technology/products/fido/
Other
145 stars 47 forks source link

Update olefile version contraint #195

Closed sevein closed 3 years ago

sevein commented 3 years ago

This commit ensures that fido uses olefile~=0.46 which makes possible to use OleFileIO as a context manager.

It potentially fixes https://github.com/openpreserve/fido/issues/179 (confirmed locally), assuming that the user had and older release of olefile installed. That would explain the error reported, where __enter__ seems to be missing.

File "/usr/local/lib/python3.6/dist-packages/opf_fido-1.4.0-py3.6.egg/fido/package.py", line 40, in detect_formats
  with olefile.OleFileIO(self.ole) as ole:
AttributeError: __enter__
sevein commented 3 years ago

Hi @sevein while the work's obviously fine it would be better if the PR was against the release candidate branch rather than master if that's OK thanks.

Done!

carlwilson commented 3 years ago

@sevein, feel free to merge :)