honza/mutt-notmuch-py — pull request #2 by MichaelRevell (2013-07-09 02:48:22+00:00)
Title: IO Errors

We should handle these potential IO errors, otherwise it halts the program if we happened to have deleted a file and not yet synced with notmuch (which actually happens fairly often for me).

Let me know if you'd prefer to handle these errors silently or with a different error message and I'll change that. Either way, I don't think we want the program to halt because of a deleted email. :P

Also, if we want, we could just wrap the open command (in digest) in the try block, but I did it outside because I didn't want to add anything to the data array if the file doesn't exist.