Kaydet (Commit) 1c5a59f8 authored tarafından Georg Brandl's avatar Georg Brandl

Bug #1458017: make distutils.Log._log more forgiving when passing in

msg strings with '%', but without format args.
üst 014d29f3
......@@ -20,7 +20,12 @@ class Log:
def _log(self, level, msg, args):
if level >= self.threshold:
print msg % args
if not args:
# msg may contain a '%'. If args is empty,
# don't even try to string-format
print msg
else:
print msg % args
sys.stdout.flush()
def log(self, level, msg, *args):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment