Commit 71493966 authored by Chris Lamb's avatar Chris Lamb 💬

Omit misleading "any of" prefix when only complaining about one module.

parent 71fb842d
......@@ -116,8 +116,9 @@ class ComparatorManager(object):
self.classes.append(getattr(mod, klass_name))
break
else: # noqa
raise ImportError(
"Could not import any of {}".format(', '.join(xs))
)
raise ImportError("Could not import {}{}".format(
"any of" if len(xs) > 1 else '',
', '.join(xs)
))
logger.debug("Loaded %d comparator classes", len(self.classes))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment