From 4ddf53a6d962a001782a0838b1b8748041125be4 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 24 Jan 2015 10:28:44 -0500 Subject: Make the two forms of debug output more uniform --- coverage/control.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index 36687fe5..8ae96fcf 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -293,14 +293,18 @@ class Coverage(object): self.omit_match = FnmatchMatcher(self.omit) # The user may want to debug things, show info if desired. + wrote_any = False if self.debug.should('config'): - self.debug.write("Configuration values:") config_info = sorted(self.config.__dict__.items()) - self.debug.write_formatted_info(config_info) + self.debug.write_formatted_info("config", config_info) + wrote_any = True if self.debug.should('sys'): - self.debug.write("Debugging info:") - self.debug.write_formatted_info(self.sysinfo()) + self.debug.write_formatted_info("sys", self.sysinfo()) + wrote_any = True + + if wrote_any: + self.debug.write_formatted_info("end", ()) def _canonical_dir(self, morf): """Return the canonical directory of the module or file `morf`.""" -- cgit v1.2.1