Skip to content

Commit 41a1149

Browse files
committed
More aggressively trap errors when importing pkg_resources. Fixes jaraco#111.
1 parent 01a168c commit 41a1149

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
- Refreshed project metadata based on `jaraco's project
55
skeleton <https://github.com/jaraco/skeleton/tree/spaces>_.
66
- Releases are now automatically published via Travis-CI.
7+
- #111: More aggressively trap errors when importing
8+
``pkg_resources``.
79

810
8.1.2
911
-----

path.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ def io_error_compat():
121121
try:
122122
import pkg_resources
123123
__version__ = pkg_resources.require('path.py')[0].version
124-
except ImportError:
125-
__version__ = 'unknown'
126-
except pkg_resources.DistributionNotFound:
124+
except Exception:
127125
__version__ = 'unknown'
128126

129127

0 commit comments

Comments
 (0)