Blame SOURCES/sos-bz1002943-Do-not-exit-on-interactive-mode-read-exceptions.patch

6b17e9
From 4e5f11cc49d28bd678b1ec0c9c3a8df3b9ac4380 Mon Sep 17 00:00:00 2001
6b17e9
From: "Bryn M. Reeves" <bmr@redhat.com>
6b17e9
Date: Thu, 3 Oct 2013 17:58:07 +0100
6b17e9
Subject: [PATCH 2/2] Do not exit on interactive mode read exceptions
6b17e9
6b17e9
Currently the default policy object will exit without logging any
6b17e9
errors if an exception (e.g. EOF while reading line) is caught
6b17e9
during reads for interactive mode prompts.
6b17e9
6b17e9
Instead re-set the report name to a sane value (localname) and
6b17e9
attempt to continue.
6b17e9
6b17e9
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
6b17e9
---
6b17e9
 sos/policies/__init__.py | 2 +-
6b17e9
 1 file changed, 1 insertion(+), 1 deletion(-)
6b17e9
6b17e9
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
6b17e9
index 8eff993..752d480 100644
6b17e9
--- a/sos/policies/__init__.py
6b17e9
+++ b/sos/policies/__init__.py
6b17e9
@@ -455,7 +455,7 @@ class LinuxPolicy(Policy):
6b17e9
                 self._print()
6b17e9
             except:
6b17e9
                 self._print()
6b17e9
-                sys.exit(0)
6b17e9
+                self.report_name = localname
6b17e9
 
6b17e9
         if len(self.report_name) == 0:
6b17e9
             self.report_name = localname
6b17e9
-- 
6b17e9
1.7.11.7
6b17e9