summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/errors.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>1999-07-10 02:01:44 (GMT)
committerGreg Ward <gward@python.net>1999-07-10 02:01:44 (GMT)
commitccbb3f0ed4ea987cf7769bcb6709b2d8f1b450c6 (patch)
treedf3568bd9d2f5bf79abc38780d0291fb8525e3bc /Lib/distutils/errors.py
parent6ebb387a087b1a64437856da4b286694396e663c (diff)
downloadcpython-ccbb3f0ed4ea987cf7769bcb6709b2d8f1b450c6.zip
cpython-ccbb3f0ed4ea987cf7769bcb6709b2d8f1b450c6.tar.gz
cpython-ccbb3f0ed4ea987cf7769bcb6709b2d8f1b450c6.tar.bz2
Don't pollute importer's namespace with type objects from types modules.
Added DistutilsPlatformError.
Diffstat (limited to 'Lib/distutils/errors.py')
-rw-r--r--Lib/distutils/errors.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/Lib/distutils/errors.py b/Lib/distutils/errors.py
index 6605ad2..f5ef385 100644
--- a/Lib/distutils/errors.py
+++ b/Lib/distutils/errors.py
@@ -12,9 +12,9 @@ symbols whose names start with "Distutils" and end with "Error"."""
__rcsid__ = "$Id$"
-from types import *
+import types
-if type (RuntimeError) is ClassType:
+if type (RuntimeError) is types.ClassType:
# DistutilsError is the root of all Distutils evil.
class DistutilsError (Exception):
@@ -52,6 +52,12 @@ if type (RuntimeError) is ClassType:
class DistutilsOptionError (DistutilsError):
pass
+ # DistutilsPlatformError is raised when we find that we don't
+ # know how to do something on the current platform (but we do
+ # know how to do it on some platform).
+ class DistutilsPlatformError (DistutilsError):
+ pass
+
# String-based exceptions
else:
DistutilsError = 'DistutilsError'
@@ -61,3 +67,6 @@ else:
DistutilsArgError = 'DistutilsArgError'
DistutilsFileError = 'DistutilsFileError'
DistutilsOptionError = 'DistutilsOptionError'
+ DistutilsPlatformError = 'DistutilsPlatformError'
+
+del types