summaryrefslogtreecommitdiff
path: root/Lib/packaging/pypi/errors.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-04-13 21:27:19 -0400
committerR David Murray <rdmurray@bitdance.com>2012-04-13 21:27:19 -0400
commitea7bc055b08fb442986e0735b1b5b325b0b51ecc (patch)
tree20c2b837c787daf7e95ece075e6544627b17625a /Lib/packaging/pypi/errors.py
parentc32365d2ce552d1d17279e30a564509235ffb1db (diff)
parentc2c9c905706160bf34aea12f2348210aac3e0da2 (diff)
downloadcpython-ea7bc055b08fb442986e0735b1b5b325b0b51ecc.tar.gz
Merge #14399: corrected news item
Diffstat (limited to 'Lib/packaging/pypi/errors.py')
-rw-r--r--Lib/packaging/pypi/errors.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/Lib/packaging/pypi/errors.py b/Lib/packaging/pypi/errors.py
new file mode 100644
index 0000000000..2191ac100c
--- /dev/null
+++ b/Lib/packaging/pypi/errors.py
@@ -0,0 +1,39 @@
+"""Exceptions raised by packaging.pypi code."""
+
+from packaging.errors import PackagingPyPIError
+
+
+class ProjectNotFound(PackagingPyPIError):
+ """Project has not been found"""
+
+
+class DistributionNotFound(PackagingPyPIError):
+ """The release has not been found"""
+
+
+class ReleaseNotFound(PackagingPyPIError):
+ """The release has not been found"""
+
+
+class CantParseArchiveName(PackagingPyPIError):
+ """An archive name can't be parsed to find distribution name and version"""
+
+
+class DownloadError(PackagingPyPIError):
+ """An error has occurs while downloading"""
+
+
+class HashDoesNotMatch(DownloadError):
+ """Compared hashes does not match"""
+
+
+class UnsupportedHashName(PackagingPyPIError):
+ """A unsupported hashname has been used"""
+
+
+class UnableToDownload(PackagingPyPIError):
+ """All mirrors have been tried, without success"""
+
+
+class InvalidSearchField(PackagingPyPIError):
+ """An invalid search field has been used"""