summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2018-01-02 11:10:50 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2018-01-02 11:10:50 +0000
commit99236c31ffafdf4ca7f3ad30ba30d3ba6b7e6783 (patch)
tree1991af746b2dbdf8580ca3de6c7672cdce901334
parent054d2a932e7cb8d18dae258750ed26fb86e650b9 (diff)
catch exception about malformed query strings
.. when getting thread message count to build search buffers. We already had a try/except block for this. This commit just moves the one offending line into that block. Fixes #1074
-rw-r--r--alot/buffers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/buffers.py b/alot/buffers.py
index cc143024..d1c6583b 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -253,7 +253,6 @@ class SearchBuffer(Buffer):
self.reversed = reverse
self.kill_filler_process()
- self.result_count = self.dbman.count_messages(self.querystring)
if reverse:
order = self._REVERSE[self.sort_order]
else:
@@ -264,6 +263,7 @@ class SearchBuffer(Buffer):
exclude_tags = [t for t in exclude_tags.split(';') if t]
try:
+ self.result_count = self.dbman.count_messages(self.querystring)
self.pipe, self.proc = self.dbman.get_threads(self.querystring,
order,
exclude_tags)