Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/errors.py @ 11115:dcc09228a3d2 legacy-trunk
Don't pollute importer's namespace with type objects from types modules.
Added DistutilsPlatformError.
| author | Greg Ward <gward@python.net> |
|---|---|
| date | Sat, 10 Jul 1999 02:01:44 +0000 |
| parents | 324450ea5450 |
| children | 89961b6813ac |
line wrap: on
line diff
--- a/Lib/distutils/errors.py Fri Jul 09 21:15:32 1999 +0000 +++ b/Lib/distutils/errors.py Sat Jul 10 02:01:44 1999 +0000 @@ -12,9 +12,9 @@ __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 @@ 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 @@ DistutilsArgError = 'DistutilsArgError' DistutilsFileError = 'DistutilsFileError' DistutilsOptionError = 'DistutilsOptionError' + DistutilsPlatformError = 'DistutilsPlatformError' + +del types
