-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[copr-dist-git][frontend] better error handling in copr-dist-dist
- Loading branch information
clime
committed
Mar 7, 2016
1 parent
7619480
commit 7b85da0
Showing
5 changed files
with
60 additions
and
103 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
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 |
---|---|---|
@@ -1,39 +1,33 @@ | ||
from .helpers import FailTypeEnum | ||
|
||
# coding: utf-8 | ||
class PackageImportException(Exception): | ||
pass | ||
|
||
class CoprDistGitException(Exception): | ||
strtype = 'unknown_error' | ||
|
||
class PackageDownloadException(Exception): | ||
pass | ||
|
||
class PackageImportException(CoprDistGitException): | ||
strtype = 'srpm_import_failed' | ||
|
||
class PackageQueryException(Exception): | ||
pass | ||
|
||
class PackageDownloadException(CoprDistGitException): | ||
strtype = 'srpm_download_failed' | ||
|
||
class SrpmBuilderException(Exception): | ||
""" | ||
error_code is defined in FailTypeEnum | ||
""" | ||
def __init__(self, error_code=None): | ||
self.code = error_code | ||
|
||
def __str__(self): | ||
return FailTypeEnum(self.code) | ||
class SrpmBuilderException(CoprDistGitException): | ||
strtype = 'srpm_build_error' | ||
|
||
|
||
class GitException(SrpmBuilderException): | ||
pass | ||
class SrpmQueryException(CoprDistGitException): | ||
strtype = 'srpm_query_failed' | ||
|
||
|
||
class PyPIException(SrpmBuilderException): | ||
pass | ||
class GitCloneException(CoprDistGitException): | ||
strtype = 'git_clone_failed' | ||
|
||
|
||
class GitAndTitoException(GitException): | ||
def __init__(self, error_code=None): | ||
super(GitAndTitoException, self).__init__(error_code) | ||
if not error_code: | ||
self.code = FailTypeEnum("tito_general_error") | ||
class GitWrongDirectoryException(CoprDistGitException): | ||
strtype = 'git_wrong_directory' | ||
|
||
|
||
class GitCheckoutException(CoprDistGitException): | ||
strtype = 'git_checkout_error' |
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
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