pazz/alot — Issue #141: Don't die upon opening deleted files
Author: 0x64746b
Created: 2011-12-01 17:29:09+00:00
State: open

If I try to view a mail in alot of which the underlying file has been deleted in the filesystem, notmuch raises a NullPointerError which alot doesn't catch:

```
Traceback (most recent call last):
File "bin/alot", line 20, in
main()
File "/home/dtk/.local/lib/python2.7/site-packages/alot/init.py", line 119, in main
args.colours,
File "/home/dtk/.local/lib/python2.7/site-packages/alot/ui.py", line 100, in __init__
self.mainloop.run()
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/raw_display.py", line 229, in run_wrapper
return fn()
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 307, in _run
self.event_loop.run()
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 1159, in wrapper
rval = f(*args,**kargs)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 358, in _update
self.process_input(keys)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 447, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/home/dtk/.local/lib/python2.7/site-packages/alot/ui.py", line 63, in keypress
self.ui.apply_command(cmd)
File "/home/dtk/.local/lib/python2.7/site-packages/alot/ui.py", line 447, in apply_command
cmd.apply(self)
File "/home/dtk/.local/lib/python2.7/site-packages/alot/commands/search.py", line 27, in apply
sb = buffers.ThreadBuffer(ui, self.thread)
File "/home/dtk/.local/lib/python2.7/site-packages/alot/buffers.py", line 191, in __init__
self.rebuild()
File "/home/dtk/.local/lib/python2.7/site-packages/alot/buffers.py", line 212, in rebuild
for msg, replies in self.thread.get_messages().items():
File "/home/dtk/.local/lib/python2.7/site-packages/alot/db.py", line 303, in get_messages
self._toplevel_messages.append(accumulate(self._messages, m))
File "/home/dtk/.local/lib/python2.7/site-packages/alot/db.py", line 293, in accumulate
M = Message(self._dbman, msg, thread=self)
File "/home/dtk/.local/lib/python2.7/site-packages/alot/message.py", line 54, in __init__
self._from = msg.get_header('From')
File "/home/dtk/.local/lib/python2.7/site-packages/notmuch/message.py", line 396, in get_header
raise NotmuchError(STATUS.NULL_POINTER)
notmuch.globals.NullPointerError: Erroneous NULL pointer
```

Plz fix that, since I intend to do that alot in the future ;P
tia
dtk ;D