python: provide more exception classes
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 26 Sep 2011 01:05:35 +0000 (03:05 +0200)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Fri, 30 Sep 2011 11:58:03 +0000 (13:58 +0200)
commitb6a01735d238733ef78f941a8b7c4bad59db2734
treee3fc127dc19ad42c04564a5a674673cbf9038117
parenta378a91ba2db58608640cd58373565d653a7c4e6
python: provide more exception classes

To make the exception handling more effective in code using the
python bindings it is necessary to differentiate between the
different kind of failures.

Add an exception class for each status code and add a decode
classmethod to the NotmuchError class that acts as a factory.

Import the new classes in __init__.py so they can be easily
imported by anyone.

Patch modifed by Sebastian Spaeth.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/python/notmuch/__init__.py
bindings/python/notmuch/database.py
bindings/python/notmuch/globals.py