From 20d6c0b560cfa63ea3de3649abd135112280acb5 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 22 Apr 2015 13:37:42 +0200 Subject: [PATCH] simplify exception capturing --HG-- branch : plugin_no_pytest --- _pytest/config.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/_pytest/config.py b/_pytest/config.py index 080e54ed5..739cc279b 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -207,14 +207,11 @@ class PytestPluginManager(PluginManager): return try: mod = importplugin(modname) - except KeyboardInterrupt: - raise except ImportError: if modname.startswith("pytest_"): return self.import_plugin(modname[7:]) raise - except: - e = sys.exc_info()[1] + except Exception as e: import pytest if not hasattr(pytest, 'skip') or not isinstance(e, pytest.skip.Exception): raise