# HG changeset patch # User Edouard Tisserant # Date 1657888713 -7200 # Node ID c2eec6aae07e1ac7b1184e66e19c53663c6674e3 # Parent d6c9da8d594e3e9cba04811efc197f51627987c2 CLI: prevent LOCAL:// runtime to use GUI (tray icon) when launch from CLI. diff -r d6c9da8d594e -r c2eec6aae07e CLIController.py --- a/CLIController.py Mon Jul 11 23:18:14 2022 +0200 +++ b/CLIController.py Fri Jul 15 14:38:33 2022 +0200 @@ -71,7 +71,7 @@ def __init__(self, session): self.session = session log = Log() - LocalRuntimeMixin.__init__(self, log) + LocalRuntimeMixin.__init__(self, log, use_gui=False) ProjectController.__init__(self, None, log) def check_and_load_project(self): diff -r d6c9da8d594e -r c2eec6aae07e LocalRuntimeMixin.py --- a/LocalRuntimeMixin.py Mon Jul 11 23:18:14 2022 +0200 +++ b/LocalRuntimeMixin.py Fri Jul 15 14:38:33 2022 +0200 @@ -9,13 +9,14 @@ class LocalRuntimeMixin(): - def __init__(self, log): + def __init__(self, log, use_gui=True): self.local_runtime_log = log self.local_runtime = None self.runtime_port = None self.local_runtime_tmpdir = None + self.use_gui = use_gui - def StartLocalRuntime(self, taskbaricon=True): + def StartLocalRuntime(self): if (self.local_runtime is None) or (self.local_runtime.exitcode is not None): # create temporary directory for runtime working directory self.local_runtime_tmpdir = tempfile.mkdtemp() @@ -29,7 +30,7 @@ sys.executable, Bpath("Beremiz_service.py"), self.runtime_port, - {False: "-x 0", True: "-x 1"}[taskbaricon], + {False: "-x 0", True: "-x 1"}[self.use_gui], self.local_runtime_tmpdir), no_gui=False, timeout=500, keyword=self.local_runtime_tmpdir,