From 6fae08cd104afd15190d836823a0dab7b228d0e6 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 31 Aug 2016 08:22:29 +0100 Subject: Closes #27904: Improved logging statements to defer formatting until needed. --- Lib/distutils/cmd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/distutils/cmd.py') diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py index c89d5efc45..b5d9dc387d 100644 --- a/Lib/distutils/cmd.py +++ b/Lib/distutils/cmd.py @@ -329,8 +329,7 @@ class Command: # -- External world manipulation ----------------------------------- def warn(self, msg): - log.warn("warning: %s: %s\n" % - (self.get_command_name(), msg)) + log.warn("warning: %s: %s\n", self.get_command_name(), msg) def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) -- cgit v1.2.1 From 03c8a473999b08710ae3661724cf1bf1d76bc555 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Thu, 8 Sep 2016 13:59:53 -0400 Subject: #27364: fix "incorrect" uses of escape character in the stdlib. And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter. --- Lib/distutils/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/distutils/cmd.py') diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py index b5d9dc387d..939f795945 100644 --- a/Lib/distutils/cmd.py +++ b/Lib/distutils/cmd.py @@ -221,7 +221,7 @@ class Command: self._ensure_stringlike(option, "string", default) def ensure_string_list(self, option): - """Ensure that 'option' is a list of strings. If 'option' is + r"""Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"]. -- cgit v1.2.1