From 7ee2fddcca6ef924ccfd10e6de9a799a9eb1abeb Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 23 Jan 2017 09:07:45 +0100 Subject: git-serve: Add support for (un-)voting Add support for voting for packages and removing votes from the SSH interface. The syntax is `vote ` resp. `unvote `. Signed-off-by: Lukas Fleischer --- aurweb/exceptions.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'aurweb/exceptions.py') 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) -- cgit v1.2.3-24-g4f1b