diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-04-18 18:08:31 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-04-18 18:08:31 +0100 |
commit | ab00491ef17679031fa516501ccbc9a696a8b57a (patch) | |
tree | e70641292e30e76742f9515abc27d39a366615a0 | |
parent | 214ddb0f35334b9e9e5344d568f4cffd656d6aa8 (diff) | |
download | sos-ab00491ef17679031fa516501ccbc9a696a8b57a.tar.gz |
Delete fossilised threading code
Remove left-over bits of the old threading infrastructure such
as the "please_exit()" plugin method and must_exit instance
variable.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 6 | ||||
-rw-r--r-- | sos/sosreport.py | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index f41964cb..435d69fe 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -133,8 +133,6 @@ class Plugin(object): self.copy_strings = [] self.collect_cmds = [] - self.must_exit = False - self.soslog = self.commons['soslog'] if self.commons.has_key('soslog') else logging.getLogger('sos') self.proflog = self.commons['proflog'] if self.commons.has_key('proflog') else logging.getLogger('sosprofile') @@ -593,10 +591,6 @@ class Plugin(object): self.soslog.debug("error collecting output of '%s' (%s)" % (prog, e)) - def exit_please(self): - """ This function tells the plugin that it should exit ASAP""" - self.must_exit = True - def get_description(self): """ This function will return the description for the plugin""" try: diff --git a/sos/sosreport.py b/sos/sosreport.py index 37b7f67f..b3f0409d 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -285,15 +285,12 @@ class SoSReport(object): raise SystemExit() # sys.exit(error) - def _exit_nice(self): - for plugname, plugin in self.loaded_plugins: - plugin.exit_please() - self.ui_log.info("All processes ended, cleaning up.") + def _exit(self): self._exit(1) def get_exit_handler(self): def exit_handler(signum, frame): - self._exit_nice() + self._exit() return exit_handler def _read_config(self): |