#6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.

This commit is contained in:
Tarek Ziadé 2009-09-21 13:41:08 +00:00
parent ccaf380fab
commit 9977335984
4 changed files with 13 additions and 1 deletions

View file

@ -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