-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise a 'PushNotFound' when specified revision/branch does not exist
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
class BasePushException(Exception): | ||
def __init__(self, rev, branch, msg): | ||
self.rev = rev | ||
self.branch = branch | ||
self.msg = f"Error processing push '{rev}' on {branch}: {msg}" | ||
|
||
|
||
class PushNotFound(BasePushException): | ||
"""Raised when the requested push does not exist.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
kwargs["msg"] = "does not exist!" | ||
super(PushNotFound, self).__init__(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters