diff options
| author | Jimmy Bergman | 2012-09-24 08:26:50 +0200 |
|---|---|---|
| committer | Jimmy Bergman | 2012-09-24 08:26:50 +0200 |
| commit | a3516893922c74b88f71ce62227adf5a683baa00 (patch) | |
| tree | 838f38fd2a6d571da443a6c0335c17044ff86371 /src/mailman/core/errors.py | |
| parent | 8271738ba287c4688173ff760118996c1590b84f (diff) | |
| parent | 12b9839a5e7f1e9fda477c5e40ed190e08292da7 (diff) | |
| download | mailman-a3516893922c74b88f71ce62227adf5a683baa00.tar.gz mailman-a3516893922c74b88f71ce62227adf5a683baa00.tar.zst mailman-a3516893922c74b88f71ce62227adf5a683baa00.zip | |
Merge with trunk
Diffstat (limited to 'src/mailman/core/errors.py')
| -rw-r--r-- | src/mailman/core/errors.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mailman/core/errors.py b/src/mailman/core/errors.py index 529ac86fe..95a318ca6 100644 --- a/src/mailman/core/errors.py +++ b/src/mailman/core/errors.py @@ -43,7 +43,10 @@ __all__ = [ 'MemberError', 'MustDigestError', 'PasswordError', + 'RESTError', + 'ReadOnlyPATCHRequestError', 'RejectMessage', + 'UnknownPATCHRequestError', ] @@ -126,3 +129,22 @@ class BadPasswordSchemeError(PasswordError): def __str__(self): return 'A bad password scheme was given: %s' % self.scheme_name + + + +class RESTError(MailmanError): + """Base class for REST API errors.""" + + +class UnknownPATCHRequestError(RESTError): + """A PATCH request contained an unknown attribute.""" + + def __init__(self, attribute): + self.attribute = attribute + + +class ReadOnlyPATCHRequestError(RESTError): + """A PATCH request contained a read-only attribute.""" + + def __init__(self, attribute): + self.attribute = attribute |
