Commit 55434e77 authored by Greg Ward's avatar Greg Ward

Don't pollute importer's namespace with type objects from types modules.

Added DistutilsPlatformError.
parent bfdc5ab4
...@@ -12,9 +12,9 @@ symbols whose names start with "Distutils" and end with "Error".""" ...@@ -12,9 +12,9 @@ symbols whose names start with "Distutils" and end with "Error"."""
__rcsid__ = "$Id$" __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. # DistutilsError is the root of all Distutils evil.
class DistutilsError (Exception): class DistutilsError (Exception):
...@@ -52,6 +52,12 @@ if type (RuntimeError) is ClassType: ...@@ -52,6 +52,12 @@ if type (RuntimeError) is ClassType:
class DistutilsOptionError (DistutilsError): class DistutilsOptionError (DistutilsError):
pass 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 # String-based exceptions
else: else:
DistutilsError = 'DistutilsError' DistutilsError = 'DistutilsError'
...@@ -61,3 +67,6 @@ else: ...@@ -61,3 +67,6 @@ else:
DistutilsArgError = 'DistutilsArgError' DistutilsArgError = 'DistutilsArgError'
DistutilsFileError = 'DistutilsFileError' DistutilsFileError = 'DistutilsFileError'
DistutilsOptionError = 'DistutilsOptionError' DistutilsOptionError = 'DistutilsOptionError'
DistutilsPlatformError = 'DistutilsPlatformError'
del types
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment