summaryrefslogtreecommitdiff
path: root/alot/widgets
diff options
context:
space:
mode:
authorTony Cheneau <tony.cheneau@amnesiak.org>2016-01-16 23:25:17 +0100
committerTony Cheneau <tony.cheneau@amnesiak.org>2016-01-16 23:25:17 +0100
commitaef8153c990a30ddbf1edd7d45f872a96c3b5737 (patch)
tree4863fcd5ef4658c7e9d449454746df0e5bf210c5 /alot/widgets
parent6fdf5d708f5ea2c1236a50815d13f9c031c5f8e6 (diff)
Do not crash when emails' date is malformated.
Diffstat (limited to 'alot/widgets')
-rw-r--r--alot/widgets/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/widgets/search.py b/alot/widgets/search.py
index 40fe7707..70c0064a 100644
--- a/alot/widgets/search.py
+++ b/alot/widgets/search.py
@@ -54,7 +54,8 @@ class ThreadlineWidget(urwid.AttrMap):
datestring = ''
if self.thread:
newest = self.thread.get_newest_date()
- datestring = settings.represent_datetime(newest)
+ if newest != None:
+ datestring = settings.represent_datetime(newest)
datestring = pad(datestring)
width = len(datestring)
part = AttrFlipWidget(urwid.Text(datestring), struct['date'])