From: Sebastian Spaeth Date: Fri, 30 Sep 2011 14:04:42 +0000 (+0200) Subject: python: rework creating of Subclasses X-Git-Tag: 0.9~29 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=8c51525e8213e074a845ad53d7196453952623dd;hp=8c51525e8213e074a845ad53d7196453952623dd;p=notmuch python: rework creating of Subclasses Add some smart magic, so that when we invoke a NotmuchError(STATUSVALUE), a nicely derived subclass is created, e.g. a OutOfMemoryError. This way users can easily distinguish between error types, while still catching NotmuchError. I have tested this, and hope it works for others too. Signed-off-by: Sebastian Spaeth ---