diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-12-17 12:39:05 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-12-17 12:39:05 +0000 |
commit | 465746d768ce69684eee57eaa3509d9ae898fee2 (patch) | |
tree | 45ba1e7099d99dfa4774652e6ffb936b676dfbd8 | |
parent | 08ffb581c93456f0c6e408677a6099aea90379b1 (diff) | |
download | sos-465746d768ce69684eee57eaa3509d9ae898fee2.tar.gz |
[navicli] catch exception if input is unreadable
CLARiiON SP IP Address or [Enter] to exit: Traceback (most recent call last):
File "/usr/sbin/sosreport", line 25, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1408, in main
sos.execute()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1387, in execute
self.setup()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1117, in setup
plug.setup()
File "/usr/lib/python2.7/site-packages/sos/plugins/navicli.py", line 72, in setup
ans = input("CLARiiON SP IP Address or [Enter] to exit: ")
EOFError: EOF when reading a line
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/navicli.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/navicli.py b/sos/plugins/navicli.py index 5175f89f..3ee7d509 100644 --- a/sos/plugins/navicli.py +++ b/sos/plugins/navicli.py @@ -69,7 +69,10 @@ class Navicli(Plugin, RedHatPlugin): CLARiiON_IP_address_list = [] CLARiiON_IP_loop = "stay_in" while CLARiiON_IP_loop == "stay_in": - ans = input("CLARiiON SP IP Address or [Enter] to exit: ") + try: + ans = input("CLARiiON SP IP Address or [Enter] to exit: ") + except: + return if self.check_ext_prog("navicli -h %s getsptime" % (ans,)): CLARiiON_IP_address_list.append(ans) else: |