summaryrefslogtreecommitdiffstats
path: root/aurweb/exceptions.py
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-01-23 09:07:45 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-01-23 09:10:28 +0100
commit7ee2fddcca6ef924ccfd10e6de9a799a9eb1abeb (patch)
tree6cf7c7f215fb122710ad83577cf0300f73f0bef8 /aurweb/exceptions.py
parentfc2ecff949ced53849e0ae10923d02d74b895c32 (diff)
downloadaur-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.py12
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)