if cmd_exe == "sat":
# use the salomeTools parser to get the options of the command
sat_parser = salomeTools.parser
- (options, argus) = sat_parser.parse_args(command.split(' ')[1:])
+ input_parser = src.remove_item_from_list(command.split(' ')[1:], "")
+ (options, argus) = sat_parser.parse_args(input_parser)
# Verify if there is a changed option
for attr in dir(options):
if attr.startswith("__"):
if not(specific_option):
options = None
- # Get dynamically the command function to call
+ # Get dynamically the command function to call
sat_command = runner.__getattr__(sat_command_name)
+
logger.write("Executing " +
src.printcolors.printcLabel(command) + " ", 3)
logger.write("." * (len_max_command - len(command)) + " ", 3)
str(e)))
self.options.logs_paths_in_file = None
+ options_launched = ""
try:
res = None
# Execute the hooks (if there is any)
res = 0
# come back to the original global options
- options_launched = ""
if options:
options_launched = get_text_from_options(self.options)
self.options = options_save
res.append(elem)
return res
+def remove_item_from_list(input_list, item):
+ """ Remove all occurences of item from input_list
+
+ :param input_list List: The list to modify
+ :return: The without any item
+ :rtype: List
+ """
+ res = []
+ for elem in input_list:
+ if elem == item:
+ continue
+ res.append(elem)
+ return res
+
def parse_date(date):
"""Transform YYYYMMDD_hhmmss into YYYY-MM-DD hh:mm:ss.