Skip to content

Commit

Permalink
Simply suppress all exceptions when attempting to resolve a version, …
Browse files Browse the repository at this point in the history
…following model in CherryPy.
  • Loading branch information
jaraco committed Jan 23, 2017
1 parent 9771379 commit 45aa7c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Kept aliases for compatibility.
#1: Corrected docstrings in :module:`cheroot.server`
and :module:`cheroot.wsgi`.

#2: Fixed ImportError when pkg_resources cannot find the
cheroot distribution.

v5.0.1
======

Expand Down
7 changes: 6 additions & 1 deletion cheroot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
try:
import pkg_resources
except ImportError:
pass


try:
__version__ = pkg_resources.get_distribution('cheroot').version
except (ImportError, pkg_resources.DistributionNotFound):
except Exception:
__version__ = 'unknown'

1 comment on commit 45aa7c5

@webknjaz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is brutal 😮

Please sign in to comment.