diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2017-01-23 09:07:45 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2017-01-23 09:10:28 +0100 |
commit | 7ee2fddcca6ef924ccfd10e6de9a799a9eb1abeb (patch) | |
tree | 6cf7c7f215fb122710ad83577cf0300f73f0bef8 /aurweb/exceptions.py | |
parent | fc2ecff949ced53849e0ae10923d02d74b895c32 (diff) | |
download | aur-7ee2fddcca6ef924ccfd10e6de9a799a9eb1abeb.tar.gz aur-7ee2fddcca6ef924ccfd10e6de9a799a9eb1abeb.tar.xz |
git-serve: Add support for (un-)voting
Add support for voting for packages and removing votes from the SSH
interface. The syntax is `vote <pkgbase>` resp. `unvote <pkgbase>`.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb/exceptions.py')
-rw-r--r-- | aurweb/exceptions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/aurweb/exceptions.py b/aurweb/exceptions.py index 5922b2df..639f9e09 100644 --- a/aurweb/exceptions.py +++ b/aurweb/exceptions.py @@ -48,6 +48,18 @@ class InvalidCommentException(AurwebException): super(InvalidCommentException, self).__init__(msg) +class AlreadyVotedException(AurwebException): + def __init__(self, comment): + msg = 'already voted for package base: {:s}'.format(comment) + super(AlreadyVotedException, self).__init__(msg) + + +class NotVotedException(AurwebException): + def __init__(self, comment): + msg = 'missing vote for package base: {:s}'.format(comment) + super(NotVotedException, self).__init__(msg) + + class InvalidArgumentsException(AurwebException): def __init__(self, msg): super(InvalidArgumentsException, self).__init__(msg) |