diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-10-03 17:58:07 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-10-03 17:58:07 +0100 |
commit | 99606d69d5d0086310e194b94f7b35da1c21bc93 (patch) | |
tree | 538aabc14084b44537782b6f972e13ae1830c896 | |
parent | dcc0b35431bc3fc134bca77903227ecb74672cb5 (diff) | |
download | sos-99606d69d5d0086310e194b94f7b35da1c21bc93.tar.gz |
Do not exit on interactive mode read exceptions
Currently the default policy object will exit without logging any
errors if an exception (e.g. EOF while reading line) is caught
during reads for interactive mode prompts.
Instead re-set the report name to a sane value (localname) and
attempt to continue.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/policies/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index 5238e774..5c2531df 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -457,7 +457,7 @@ class LinuxPolicy(Policy): self._print() except: self._print() - sys.exit(0) + self.report_name = localname if len(self.report_name) == 0: self.report_name = localname |