8000 Invalid OleFile Raises Different Exceptions in Python 2 and 3 · Issue #109 · decalage2/olefile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Invalid OleFile Raises Different Exceptions in Python 2 and 3 #109
Open
@TheElementalOfDestruction

Description

Is your feature request related to a problem? Please describe.
Python 2 raises an IOError for an invalid olefile, but Python 3 raises an OSError for an invalid olefile.

Describe the solution you'd like
Choose a single exception type and use it for both versions. Preferably, raise a custom exception type.

Describe alternatives you've considered
Right now I can sort of get around this by just catching all IOErrors, checking if they are for invalid ole, and then raising them under a new exception if 5B70 they are. Otherwise, I re-raise the original exception.

Additional context
I am the current manager of the msg-extractor project, and this would be a great help.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0