From ff9099051e0daff7b08035713eeca5696ab3217a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 22 Sep 2009 07:22:56 -0400 Subject: The best way to get py3k support: same source runs on both, with some contortions. --- coverage/cmdline.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'coverage/cmdline.py') diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 1348a743..587fac51 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -279,17 +279,17 @@ class CoverageScript: """Display an error message, or the named topic.""" assert error or topic or parser if error: - print error - print "Use 'coverage help' for help." + print(error) + print("Use 'coverage help' for help.") elif parser: - print parser.format_help(), + print(parser.format_help().strip()) else: # Parse out the topic we want from HELP_TOPICS import re topic_list = re.split("(?m)^=+ (\w+) =+$", HELP_TOPICS) topics = dict(zip(topic_list[1::2], topic_list[2::2])) help_msg = topics[topic].strip() - print help_msg % self.covpkg.__dict__ + print(help_msg % self.covpkg.__dict__) def command_line(self, argv): """The bulk of the command line interface to Coverage. -- cgit v1.2.1