summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-09-25 09:47:08 -0400
committerNed Batchelder <ned@nedbatchelder.com>2016-09-25 09:47:08 -0400
commit92db04203fbf4d58e64d262123f9e4b5bc6b7da7 (patch)
treecd5b0f6de87636afc244aa0086abf854e61f1a73 /coverage/control.py
parent9c4dceead20ed6ba495d32d05dd5d871c35b706d (diff)
downloadpython-coveragepy-92db04203fbf4d58e64d262123f9e4b5bc6b7da7.tar.gz
A better way to prevent call stacks during multi-line output
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 3464d66..351992f 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", ())