simplify exception capturing
--HG-- branch : plugin_no_pytest
This commit is contained in:
parent
c08dfdc330
commit
20d6c0b560
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue