summaryrefslogtreecommitdiff
path: root/alot/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'alot/widgets')
-rw-r--r--alot/widgets/thread.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py
index a165ee45..6c5d71fe 100644
--- a/alot/widgets/thread.py
+++ b/alot/widgets/thread.py
@@ -124,7 +124,8 @@ class _CryptPartWidget(_MIMEPartWidget):
text_parts.append('crypto processing error: ' + mime_tree.crypt_error)
attr_name = 'crypt_invalid'
- child = _render_mime_tree(mime_tree.children[0], alternative_pref)
+ child = _render_mime_tree(mime_tree.children[0], alternative_pref) \
+ or _EmptyPartWidget()
attr = settings.get_theming_attribute('thread', attr_name)
body_wgt = urwid.AttrMap(urwid.LineBox(child, title = ':'.join(text_parts)), attr)
children = [child]
@@ -314,7 +315,7 @@ class _TextPart(_MIMEPartWidget):
class _EmptyMessageWidget(_MIMEPartWidget):
def __init__(self):
- body_wgt = urwid.Text('<<Message body is empty>>>', align = 'center')
+ body_wgt = urwid.Text('<<< No displayable content >>>', align = 'center')
super().__init__(body_wgt)
def _handle_mixed(mime_tree, alternative_pref):
@@ -478,7 +479,7 @@ class MessageWidget(urwid.WidgetWrap):
self._body_wgt = _render_mime_tree(message.body, alternative_pref)
if self._body_wgt is None:
- self._body_wgt = _EmptyMessageWidget()
+ self._body_wgt = _EmptyPartWidget()
super().__init__(urwid.ListBox(urwid.SimpleListWalker([])))