commit | 99773359843803c54574b6ee6fc1516e7fcde10f | [log] [tgz] |
---|---|---|
author | Tarek Ziadé <ziade.tarek@gmail.com> | Mon Sep 21 13:41:08 2009 +0000 |
committer | Tarek Ziadé <ziade.tarek@gmail.com> | Mon Sep 21 13:41:08 2009 +0000 |
tree | 68960c3b75d0819093d72d6e742273246a678e18 | |
parent | ccaf380fabaf09362de926a648b131114b33e90b [diff] [blame] |
#6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
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 @@ 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