Skip to content
Snippets Groups Projects
Commit e26810fc authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-488: handle non-list commands as well

parent ecfa44bc
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,8 @@ def wrap_command_in_lcu_station_ssh_call(cmd, station, via_head=True): ...@@ -44,7 +44,8 @@ def wrap_command_in_lcu_station_ssh_call(cmd, station, via_head=True):
:param bool via_head: when True, route the cmd first via the lcuhead node :param bool via_head: when True, route the cmd first via the lcuhead node
:return: the same subprocess cmd list, but then wrapped with lcu ssh calls :return: the same subprocess cmd list, but then wrapped with lcu ssh calls
''' '''
remote_cmd = ssh_cmd_list(stationname2hostname(station), 'lofarsys') + cmd cmd_list = cmd if isinstance(cmd, list) else [cmd]
remote_cmd = ssh_cmd_list(stationname2hostname(station), 'lofarsys') + cmd_list
if via_head: if via_head:
return wrap_command_in_lcu_head_node_ssh_call(remote_cmd) return wrap_command_in_lcu_head_node_ssh_call(remote_cmd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment