summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/log.py')
-rw-r--r--Lib/distutils/log.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/distutils/log.py b/Lib/distutils/log.py
index cf3ee13..95d4c1c 100644
--- a/Lib/distutils/log.py
+++ b/Lib/distutils/log.py
@@ -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):