Skip to content

Commit

Permalink
Let AssertionErrors bubble up
Browse files Browse the repository at this point in the history
Sometimes we want to use AssertionError to cause test
failures, and it is unlikely to be used in real code,
so just let the error bubble up if it is encountered
while loading a plugin.

Change-Id: I7ad20b0796c1a02427d324aa7f35bb238013c425
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
  • Loading branch information
Doug Hellmann committed Jan 5, 2013
1 parent 0a51bfd commit c89446f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/source/history.rst
Expand Up @@ -2,6 +2,11 @@
History
=========

dev

- Ignore AssertionError exceptions generated when plugins are
loaded.

0.7.2

- Fix logging support for Python 2.6.
Expand Down
2 changes: 1 addition & 1 deletion stevedore/extension.py
Expand Up @@ -76,7 +76,7 @@ def _load_plugins(self, invoke_on_load, invoke_args, invoke_kwds):
)
if ext:
extensions.append(ext)
except KeyboardInterrupt:
except (KeyboardInterrupt, AssertionError):
raise
except Exception as err:
LOG.error('Could not load %r: %s', ep.name, err)
Expand Down

0 comments on commit c89446f

Please sign in to comment.