]> granicus.if.org Git - python/commitdiff
forgot to commit a file in previous commit (r74994, issue #6954)
authorTarek Ziadé <ziade.tarek@gmail.com>
Mon, 21 Sep 2009 13:49:57 +0000 (13:49 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Mon, 21 Sep 2009 13:49:57 +0000 (13:49 +0000)
Lib/distutils/tests/support.py

index bce034949e05c1bb1ecc00414ad0e061feaa0031..3c328cc9a64bb43369305e7c1067ff8725703e3d 100644 (file)
@@ -4,6 +4,7 @@ import shutil
 import tempfile
 
 from distutils import log
+from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL
 from distutils.core import Distribution
 from test.test_support import EnvironmentVarGuard
 
@@ -25,6 +26,8 @@ class LoggingSilencer(object):
         super(LoggingSilencer, self).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):