|
|
e75bc7 |
From 465746d768ce69684eee57eaa3509d9ae898fee2 Mon Sep 17 00:00:00 2001
|
|
|
e75bc7 |
From: "Bryn M. Reeves" <bmr@redhat.com>
|
|
|
e75bc7 |
Date: Wed, 17 Dec 2014 12:39:05 +0000
|
|
|
e75bc7 |
Subject: [PATCH] [navicli] catch exception if input is unreadable
|
|
|
e75bc7 |
|
|
|
e75bc7 |
CLARiiON SP IP Address or [Enter] to exit: Traceback (most recent call last):
|
|
|
e75bc7 |
File "/usr/sbin/sosreport", line 25, in <module>
|
|
|
e75bc7 |
main(sys.argv[1:])
|
|
|
e75bc7 |
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1408, in main
|
|
|
e75bc7 |
sos.execute()
|
|
|
e75bc7 |
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1387, in execute
|
|
|
e75bc7 |
self.setup()
|
|
|
e75bc7 |
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1117, in setup
|
|
|
e75bc7 |
plug.setup()
|
|
|
e75bc7 |
File "/usr/lib/python2.7/site-packages/sos/plugins/navicli.py", line 72, in setup
|
|
|
e75bc7 |
ans = input("CLARiiON SP IP Address or [Enter] to exit: ")
|
|
|
e75bc7 |
EOFError: EOF when reading a line
|
|
|
e75bc7 |
|
|
|
e75bc7 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
e75bc7 |
---
|
|
|
e75bc7 |
sos/plugins/navicli.py | 5 ++++-
|
|
|
e75bc7 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
e75bc7 |
|
|
|
e75bc7 |
diff --git a/sos/plugins/navicli.py b/sos/plugins/navicli.py
|
|
|
e75bc7 |
index 5175f89..3ee7d50 100644
|
|
|
e75bc7 |
--- a/sos/plugins/navicli.py
|
|
|
e75bc7 |
+++ b/sos/plugins/navicli.py
|
|
|
e75bc7 |
@@ -69,7 +69,10 @@ class Navicli(Plugin, RedHatPlugin):
|
|
|
e75bc7 |
CLARiiON_IP_address_list = []
|
|
|
e75bc7 |
CLARiiON_IP_loop = "stay_in"
|
|
|
e75bc7 |
while CLARiiON_IP_loop == "stay_in":
|
|
|
e75bc7 |
- ans = input("CLARiiON SP IP Address or [Enter] to exit: ")
|
|
|
e75bc7 |
+ try:
|
|
|
e75bc7 |
+ ans = input("CLARiiON SP IP Address or [Enter] to exit: ")
|
|
|
e75bc7 |
+ except:
|
|
|
e75bc7 |
+ return
|
|
|
e75bc7 |
if self.check_ext_prog("navicli -h %s getsptime" % (ans,)):
|
|
|
e75bc7 |
CLARiiON_IP_address_list.append(ans)
|
|
|
e75bc7 |
else:
|
|
|
e75bc7 |
--
|
|
|
e75bc7 |
1.9.3
|
|
|
e75bc7 |
|