summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/log.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-09-21 13:41:08 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-09-21 13:41:08 (GMT)
commit99773359843803c54574b6ee6fc1516e7fcde10f (patch)
tree68960c3b75d0819093d72d6e742273246a678e18 /Lib/distutils/log.py
parentccaf380fabaf09362de926a648b131114b33e90b (diff)
downloadcpython-99773359843803c54574b6ee6fc1516e7fcde10f.zip
cpython-99773359843803c54574b6ee6fc1516e7fcde10f.tar.gz
cpython-99773359843803c54574b6ee6fc1516e7fcde10f.tar.bz2
#6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
Diffstat (limited to 'Lib/distutils/log.py')
-rw-r--r--Lib/distutils/log.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/distutils/log.py b/Lib/distutils/log.py
index 6f949d5..7588570 100644
--- a/Lib/distutils/log.py
+++ b/Lib/distutils/log.py
@@ -17,6 +17,9 @@ class Log:
self.threshold = threshold
def _log(self, level, msg, args):
+ if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
+ raise ValueError('%s wrong log level' % str(level))
+
if level >= self.threshold:
if args:
msg = msg % args