summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/distutils2/errors.py4
-rw-r--r--src/distutils2/index/errors.py22
-rw-r--r--src/distutils2/index/simple.py4
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: