diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-22 07:22:56 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-22 07:22:56 -0400 |
commit | d18c4a8ca50361893eaa7ba86821a136ba7a4807 (patch) | |
tree | d5b682a46e9b44a6edd6e12771ffc831503cb594 /coverage/cmdline.py | |
parent | cfdd8b9c6c9a0fc0bb0d332dd034330a37ea5a1f (diff) | |
download | python-coveragepy-d18c4a8ca50361893eaa7ba86821a136ba7a4807.tar.gz |
The best way to get py3k support: same source runs on both, with some contortions.
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r-- | coverage/cmdline.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 1348a74..587fac5 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. |