diff --git a/LCS/PyCommon/lcu_utils.py b/LCS/PyCommon/lcu_utils.py index 6762c05b9883f04cd1f6f541495ea4e7c0edcc92..d5aa453b5c49ddae9fa6e54e02ce87879699132e 100644 --- a/LCS/PyCommon/lcu_utils.py +++ b/LCS/PyCommon/lcu_utils.py @@ -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 :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: return wrap_command_in_lcu_head_node_ssh_call(remote_cmd)