don't consider setuptools plugins if it is not installed.

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-11-24 10:49:04 +01:00
parent 79a9a99d1e
commit 9652be0ac1
2 changed files with 11 additions and 1 deletions

View File

@@ -78,7 +78,10 @@ class PluginManager(object):
self.import_plugin(spec)
def consider_setuptools_entrypoints(self):
from pkg_resources import iter_entry_points
try:
from pkg_resources import iter_entry_points
except ImportError:
return # XXX issue a warning
for ep in iter_entry_points('pytest11'):
if ep.name in self._name2plugin:
continue