summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/log.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-09-21 13:55:19 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-09-21 13:55:19 (GMT)
commit31d4607db195a0facc48e1b9095260a146097800 (patch)
tree080e0463bd804bdb8fd2673f05fd606af6f95474 /Lib/distutils/log.py
parente7631191b0051af2ac1ed8f6121b548545540c0f (diff)
downloadcpython-31d4607db195a0facc48e1b9095260a146097800.zip
cpython-31d4607db195a0facc48e1b9095260a146097800.tar.gz
cpython-31d4607db195a0facc48e1b9095260a146097800.tar.bz2
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) ........
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