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