Make all lookup plugins work with lists

Lookup plugins should accept a string or a list, and always return
a list, even if it is just one item.
This commit is contained in:
Daniel Hokka Zakrisson
2012-12-05 12:26:23 +01:00
parent 6350dedd7a
commit b73016b881
9 changed files with 101 additions and 68 deletions

View File

@@ -21,7 +21,6 @@ class LookupModule(object):
pass
def run(self, terms, **kwargs):
return terms
if isinstance(terms, basestring):
terms = [ terms ]
return [term for term in terms]