8000 Change from catching BaseException to Exception. · Issue #153 · decalage2/olefile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Change from catching BaseException to Exception. #153
Open
@TheElementalOfDestruction

Description

olefile version 0.46 and 0.47.dev4 (master branch)

I've noticed that a number of the try-except blocks are specifically catching BaseException instead of Exception, which could lead to strange issues of exceptions being silenced where they should not (for example, KeyboardInterrupt and SystemExit). Looking through the code it appears that all of the exceptions raised (the ones that should be caught) will be subclasses of Exception and not BaseException, so there is no immediately obvious reason to catch BaseException instead.

These sections are overall so short that this issue coming up should be rare, but it does still appear to be possible.

These catches can be seen on lines 2163, 2185, 2502, and 2509 of olefile.py on the master branch.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0