]> git.notmuchmail.org Git - notmuch/commit
python: raise a more specific error in Messages.print_messages
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 26 Sep 2011 01:05:37 +0000 (03:05 +0200)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Thu, 29 Sep 2011 07:39:45 +0000 (09:39 +0200)
commit34990908e75f73061753a7f38201a05247a207a1
treeff6aeefbd97070b92d54d3fe68a35063ffbfa5ae
parentf88d985e507a96b5179c2de793b9b75da55457a3
python: raise a more specific error in Messages.print_messages

Raising Exception is considered bad since the only way to catch
it is to do 'except Exception'. Raising a TypeError is more
appropriate.

Since the format parameter has already been validated, checking
it again is not necessary. Simplify this conditional.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/python/notmuch/message.py