Merged revisions 74994,74997 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74994 | tarek.ziade | 2009-09-21 15:41:08 +0200 (Mon, 21 Sep 2009) | 1 line

  #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
........
  r74997 | tarek.ziade | 2009-09-21 15:49:57 +0200 (Mon, 21 Sep 2009) | 1 line

  forgot to commit a file in previous commit (r74994, issue #6954)
........
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py
index 1255413..ea12211 100644
--- a/Lib/distutils/tests/support.py
+++ b/Lib/distutils/tests/support.py
@@ -4,6 +4,7 @@
 import tempfile
 
 from distutils import log
+from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL
 from distutils.core import Distribution
 from test.support import EnvironmentVarGuard
 
@@ -25,6 +26,8 @@
         super().tearDown()
 
     def _log(self, level, msg, args):
+        if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
+            raise ValueError('%s wrong log level' % str(level))
         self.logs.append((level, msg, args))
 
     def get_logs(self, *levels):