simplify exception capturing

--HG--
branch : plugin_no_pytest
This commit is contained in:
holger krekel 2015-04-22 13:37:42 +02:00
parent c08dfdc330
commit 20d6c0b560
1 changed files with 1 additions and 4 deletions

View File

@ -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