diff --git a/Lib/distutils/log.py b/Lib/distutils/log.py index cf3ee136e0a..95d4c1c5a21 100644 --- a/Lib/distutils/log.py +++ b/Lib/distutils/log.py @@ -20,7 +20,12 @@ def __init__(self, threshold=WARN): 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):