summaryrefslogtreecommitdiff
path: root/alot/buffer.py
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-05-27 11:44:07 +0100
committerpazz <patricktotzke@gmail.com>2011-05-27 11:44:07 +0100
commita489102d352b23321b5fcadd317f7a1b30d3806c (patch)
treeab963c55f01ee3b18cd803626dd461d3f06e1b94 /alot/buffer.py
parent2aa064e7e4dfa7fc25d9977ba797586326f9a6e3 (diff)
only catch Assertions in buffer.keypress
Diffstat (limited to 'alot/buffer.py')
-rw-r--r--alot/buffer.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/alot/buffer.py b/alot/buffer.py
index ce7572bd..22984c41 100644
--- a/alot/buffer.py
+++ b/alot/buffer.py
@@ -29,7 +29,7 @@ class Buffer(urwid.AttrMap):
try:
cmd = command.factory(cmdname, **parms)
self.apply_command(cmd)
- except Exception as e:
+ except AssertionError as e:
self.ui.logger.info("could not instanciate command %s(%s): %s"
%(cmdname,parms,e))
else:
@@ -115,11 +115,8 @@ class SearchBuffer(Buffer):
self.tids = self.dbman.search_thread_ids(self.querystring)
self.threadlist = IteratorWalker(self.tids.__iter__(), widgets.ThreadlineWidget,
dbman=self.dbman)
- self.ui.logger.debug(len(self.tids))
- self.original_widget = urwid.ListBox(self.threadlist)
- self.ui.logger.debug(self.threadlist.lines)
-
- self.threadlist.set_focus(focusposition)
+ self.listbox = urwid.ListBox(self.threadlist)
+ self.original_widget = self.listbox
def debug(self):
self.ui.logger.debug(self.threadlist.lines)