]> granicus.if.org Git - python/commitdiff
Don't pollute importer's namespace with type objects from types modules.
authorGreg Ward <gward@python.net>
Sat, 10 Jul 1999 02:01:44 +0000 (02:01 +0000)
committerGreg Ward <gward@python.net>
Sat, 10 Jul 1999 02:01:44 +0000 (02:01 +0000)
Added DistutilsPlatformError.

Lib/distutils/errors.py

index 6605ad2cb1616d37850c7945232c96b6249505bd..f5ef385120bb4670f5b4be2de3c0d639ab4d0f9d 100644 (file)
@@ -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