Fix remote protocol add to working list
Changes:
- Add SSH or SCP only if user specify in CLI -rp option
Tested:
- with -rp SSH
- with -rp SCP
- with default
Change-Id: I5c22b9429f3fdc925b272aa2fb51ce809abb5b97
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ffdc/ffdc_collector.py b/ffdc/ffdc_collector.py
index 034948f..1b27247 100644
--- a/ffdc/ffdc_collector.py
+++ b/ffdc/ffdc_collector.py
@@ -880,8 +880,12 @@
# Only check SSH/SCP once for both protocols
if protocol == 'SSH' or protocol == 'SCP' and protocol not in tmp_list:
if self.ssh_to_target_system():
- tmp_list.append('SSH')
- tmp_list.append('SCP')
+ # Add only what user asked.
+ if self.remote_protocol != 'ALL':
+ tmp_list.append(self.remote_protocol)
+ else:
+ tmp_list.append('SSH')
+ tmp_list.append('SCP')
if protocol == 'TELNET':
if self.telnet_to_target_system():