Skip to content

Commit

Permalink
Render lists of results in as_text()
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Jan 3, 2014
1 parent a63ae64 commit 5cea729
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mailpile/plugins/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def _fixup(self):

def as_text(self):
if self.result:
return self.result.as_text()
if isinstance(self.result, (list, set)):
return '\n'.join([r.as_text() for r in self.result])
else:
return self.result.as_text()
else:
return 'No results'

Expand Down

0 comments on commit 5cea729

Please sign in to comment.