[Python-checkins] distutils2: Rename index.IndexesError to DistutilsIndexError
tarek.ziade
python-checkins at python.org
Thu Aug 19 08:34:13 CEST 2010
tarek.ziade pushed 272a3087dd6e to distutils2:
http://hg.python.org/distutils2/rev/272a3087dd6e
changeset: 556:272a3087dd6e
user: Alexis Metaireau <ametaireau at gmail.com>
date: Fri Aug 13 16:52:05 2010 +0200
summary: Rename index.IndexesError to DistutilsIndexError
files: src/distutils2/errors.py, src/distutils2/index/errors.py, src/distutils2/index/simple.py
diff --git a/src/distutils2/errors.py b/src/distutils2/errors.py
--- a/src/distutils2/errors.py
+++ b/src/distutils2/errors.py
@@ -80,6 +80,10 @@
"""Byte compile error."""
+class DistutilsIndexError(DistutilsError):
+ """Any problem occuring during using the indexes."""
+
+
# Exception classes used by the CCompiler implementation classes
class CCompilerError(Exception):
"""Some compile/link operation failed."""
diff --git a/src/distutils2/index/errors.py b/src/distutils2/index/errors.py
--- a/src/distutils2/index/errors.py
+++ b/src/distutils2/index/errors.py
@@ -2,30 +2,26 @@
All errors and exceptions raised by PyPiIndex classes.
"""
-from distutils2.errors import DistutilsError
+from distutils2.errors import DistutilsIndexError
-class IndexesError(DistutilsError):
- """The base class for errors of the index python package."""
-
-
-class ProjectNotFound(IndexesError):
+class ProjectNotFound(DistutilsIndexError):
"""Project has not been found"""
-class DistributionNotFound(IndexesError):
+class DistributionNotFound(DistutilsIndexError):
"""The release has not been found"""
-class ReleaseNotFound(IndexesError):
+class ReleaseNotFound(DistutilsIndexError):
"""The release has not been found"""
-class CantParseArchiveName(IndexesError):
+class CantParseArchiveName(DistutilsIndexError):
"""An archive name can't be parsed to find distribution name and version"""
-class DownloadError(IndexesError):
+class DownloadError(DistutilsIndexError):
"""An error has occurs while downloading"""
@@ -33,13 +29,13 @@
"""Compared hashes does not match"""
-class UnsupportedHashName(IndexesError):
+class UnsupportedHashName(DistutilsIndexError):
"""A unsupported hashname has been used"""
-class UnableToDownload(IndexesError):
+class UnableToDownload(DistutilsIndexError):
"""All mirrors have been tried, without success"""
-class InvalidSearchField(IndexesError):
+class InvalidSearchField(DistutilsIndexError):
"""An invalid search field has been used"""
diff --git a/src/distutils2/index/simple.py b/src/distutils2/index/simple.py
--- a/src/distutils2/index/simple.py
+++ b/src/distutils2/index/simple.py
@@ -17,7 +17,7 @@
from distutils2.index.base import BaseClient
from distutils2.index.dist import (ReleasesList, EXTENSIONS,
get_infos_from_url, MD5_HASH)
-from distutils2.index.errors import (IndexesError, DownloadError,
+from distutils2.index.errors import (DistutilsIndexError, DownloadError,
UnableToDownload, CantParseArchiveName,
ReleaseNotFound, ProjectNotFound)
from distutils2.index.mirrors import get_mirrors
@@ -395,7 +395,7 @@
fp = urllib2.urlopen(request)
except (ValueError, httplib.InvalidURL), v:
msg = ' '.join([str(arg) for arg in v.args])
- raise IndexesError('%s %s' % (url, msg))
+ raise DistutilsIndexError('%s %s' % (url, msg))
except urllib2.HTTPError, v:
return v
except urllib2.URLError, v:
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list