Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chages in desktop_service.py reagrding options management #14

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions embasp/platforms/desktop/desktop_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__))
Expand All @@ -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 != "":
Expand Down
Loading