From 7853bcc0f3091c6457d6c792dd14c0cd3402a972 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 10 May 2016 04:27:17 -0500 Subject: [PATCH] Fix dependency checking for search engines. --- earwigbot/wiki/copyvios/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/wiki/copyvios/__init__.py b/earwigbot/wiki/copyvios/__init__.py index d63f384..45385e7 100644 --- a/earwigbot/wiki/copyvios/__init__.py +++ b/earwigbot/wiki/copyvios/__init__.py @@ -71,8 +71,8 @@ class CopyvioMixIn(object): for dep in klass.requirements(): try: - __import__(dep).__package__ - except ImportError: + __import__(dep).__name__ + except (ImportError, AttributeError): e = "Missing a required dependency ({}) for the {} engine" e = e.format(dep, engine) raise exceptions.UnsupportedSearchEngineError(e)