diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-09-25 09:47:08 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-09-25 09:47:08 -0400 |
commit | 4e40f4dcfdf4f9eed0eb396f39228b1bab56b0f9 (patch) | |
tree | c30a0eaf4a2f775d3a26971ed0fb77c6c7b26d14 /coverage/control.py | |
parent | 910554531a29f73304fb3bcd29f1cd0e5efb2e4e (diff) | |
download | python-coveragepy-git-4e40f4dcfdf4f9eed0eb396f39228b1bab56b0f9.tar.gz |
A better way to prevent call stacks during multi-line output
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/coverage/control.py b/coverage/control.py index 3464d66f..351992f2 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -366,18 +366,19 @@ class Coverage(object): # The user may want to debug things, show info if desired. wrote_any = False - if self.debug.should('config'): - config_info = sorted(self.config.__dict__.items()) - self.debug.write_formatted_info("config", config_info) - wrote_any = True - - if self.debug.should('sys'): - self.debug.write_formatted_info("sys", self.sys_info()) - for plugin in self.plugins: - header = "sys: " + plugin._coverage_plugin_name - info = plugin.sys_info() - self.debug.write_formatted_info(header, info) - wrote_any = True + with self.debug.without_callers(): + if self.debug.should('config'): + config_info = sorted(self.config.__dict__.items()) + self.debug.write_formatted_info("config", config_info) + wrote_any = True + + if self.debug.should('sys'): + self.debug.write_formatted_info("sys", self.sys_info()) + for plugin in self.plugins: + header = "sys: " + plugin._coverage_plugin_name + info = plugin.sys_info() + self.debug.write_formatted_info(header, info) + wrote_any = True if wrote_any: self.debug.write_formatted_info("end", ()) |