mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
#6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
This commit is contained in:
parent
ccaf380fab
commit
9977335984
4 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue