diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-09-13 12:07:31 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-09-13 12:07:31 +0100 |
commit | 6cb28428c32eedb2c02585d878361dfd4d6c59ef (patch) | |
tree | 8051175168ba326f25ff36b0770ad1ad1dd155a8 | |
parent | dcbfb39e1cfea0cfbdcf736de01f2e33dd674e8d (diff) | |
download | sos-6cb28428c32eedb2c02585d878361dfd4d6c59ef.tar.gz |
[sosreport] remove jython logging handler workaround
The workaround in sosreport.py for log handlers persisting past
logging.shutdown() on Jython causes further problems with leaking
log handler messages in the non-build case (i.e. where we are
calling the Archive's finalize() method). Fix this by removing
the workaround since sos no longer targets the Jython runtime.
Fixes: #393.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/sosreport.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index 34b45ab2..95da0372 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -740,12 +740,6 @@ class SoSReport(object): self.archive.add_file(self.sos_ui_log_file.name, dest=os.path.join('sos_logs', 'ui.log')) - # the logging module seems to persist in the jython/jboss/eap world - # so the handlers need to be removed - for logger in [logging.getLogger(x) for x in ('sos', 'sos_ui')]: - for h in logger.handlers: - logger.removeHandler(h) - def _get_disabled_plugins(self): disabled = [] if self.config.has_option("plugins", "disable"): @@ -1229,7 +1223,8 @@ class SoSReport(object): self._finish_logging() # package up the results for the support organization if not self.opts.build: - print(_("Creating compressed archive...")) + if not self.opts.quiet: + print(_("Creating compressed archive...")) # compression could fail for a number of reasons try: final_filename = self.archive.finalize( |