summaryrefslogtreecommitdiff
path: root/alot/ui.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/ui.py')
-rw-r--r--alot/ui.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/alot/ui.py b/alot/ui.py
index a8da57d2..deec3ab1 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -317,7 +317,7 @@ class UI(object):
def cerror(e):
logging.error(e)
- self.notify('completion error: %s' % e.message,
+ self.notify('completion error: %s' % str(e),
priority='error')
self.update()
@@ -329,7 +329,7 @@ class UI(object):
edit_text=text, history=history,
on_error=cerror)
- for _ in xrange(tab): # hit some tabs
+ for _ in range(tab): # hit some tabs
editpart.keypress((0,), 'tab')
# build promptwidget
@@ -529,9 +529,8 @@ class UI(object):
:rtype: :class:`twisted.defer.Deferred`
"""
choices = choices or {'y': 'yes', 'n': 'no'}
- choices_to_return = choices_to_return or {}
- assert select is None or select in choices.itervalues()
- assert cancel is None or cancel in choices.itervalues()
+ assert select is None or select in choices.values()
+ assert cancel is None or cancel in choices.values()
assert msg_position in ['left', 'above']
d = defer.Deferred() # create return deferred