From c21a3719f7e864cabe79c80f090a9f4d0e2b5d1e Mon Sep 17 00:00:00 2001 From: Marco Duca Date: Sat, 9 Dec 2023 19:31:07 +0100 Subject: [PATCH] Chages in desktop_service.py reagrding options management --- embasp/platforms/desktop/desktop_service.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/embasp/platforms/desktop/desktop_service.py b/embasp/platforms/desktop/desktop_service.py index 65a0799..fde3906 100644 --- a/embasp/platforms/desktop/desktop_service.py +++ b/embasp/platforms/desktop/desktop_service.py @@ -50,11 +50,10 @@ def run(self): def start_sync(self, programs, options): """Start a new process for the _exe_path and starts solving syncronously.""" - option = "" + option = [] for o in options: if o is not None: - option += str(o.get_options()) - option += str(o.get_separator()) + option.append(str(o.get_options())) else: print("Warning : wrong " + str(OptionDescriptor().__class__.__name__)) @@ -73,19 +72,17 @@ def start_sync(self, programs, options): return Output("", "Error: executable not found") exep = str(self._exe_path) - opt = str(option) lis = list() lis.append(exep) - if opt != "": - lis.append(opt) + lis.extend(option) lis.extend(files_paths) if self._load_from_STDIN_option != "" and final_program != "": lis.append(self._load_from_STDIN_option) print(exep + " ", end='') - if opt != "": - print(opt + " ", end='') + if option != []: + print(str(option) + " ", end='') for path in files_paths: print(path + " ", end='') if final_program != "":