diff options
| author | Alexis Metaireau <ametaireau@gmail.com> | 2010-08-13 16:52:05 +0200 |
|---|---|---|
| committer | Alexis Metaireau <ametaireau@gmail.com> | 2010-08-13 16:52:05 +0200 |
| commit | c4bfeb56d1d5f83cc215dffbfc0ee804c722ce5c (patch) | |
| tree | d9dcfaccebbe2031e99ca8b7e63c9d58af7997a1 /src | |
| parent | d9920b49ff8a5e0042f115d00ff9dc219f73b312 (diff) | |
| download | disutils2-c4bfeb56d1d5f83cc215dffbfc0ee804c722ce5c.tar.gz | |
Rename index.IndexesError to DistutilsIndexError
Diffstat (limited to 'src')
| -rw-r--r-- | src/distutils2/errors.py | 4 | ||||
| -rw-r--r-- | src/distutils2/index/errors.py | 22 | ||||
| -rw-r--r-- | src/distutils2/index/simple.py | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/distutils2/errors.py b/src/distutils2/errors.py index ef3e300..43469ce 100644 --- a/src/distutils2/errors.py +++ b/src/distutils2/errors.py @@ -80,6 +80,10 @@ class DistutilsByteCompileError(DistutilsError): """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 index 730ccce..e6e5870 100644 --- 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 @@ class HashDoesNotMatch(DownloadError): """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 index cdb19c6..ea990f3 100644 --- a/src/distutils2/index/simple.py +++ b/src/distutils2/index/simple.py @@ -17,7 +17,7 @@ import os 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 @@ class Crawler(BaseClient): 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: |
