Browse Source

Fix logic around gCarla.nogui

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
10538252f4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      source/frontend/carla_shared.py

+ 3
- 3
source/frontend/carla_shared.py View File

@@ -668,7 +668,7 @@ def handleInitialCommandLineArguments(file):
print(" and OPTION can be one or more of the following:")
print("")
print(" --cnprefix\t Set a prefix for client names in multi-client mode.")
if not isinstance(gCarla.nogui, int):
if isinstance(gCarla.nogui, bool):
print(" --gdb \t Run Carla inside gdb.")
print(" -n,--no-gui \t Run Carla headless, don't show UI.")
print("")
@@ -676,7 +676,7 @@ def handleInitialCommandLineArguments(file):
print(" -v,--version \t Print version information and exit.")
print("")

if isinstance(gCarla.nogui, int):
if not isinstance(gCarla.nogui, bool):
print("NOTE: when using %s the FILE is only valid the first time the backend is started" % initName)
sys.exit(1)

@@ -698,7 +698,7 @@ def handleInitialCommandLineArguments(file):
readPrefixNext = False
gCarla.cnprefix = arg

if gCarla.nogui and isinstance(gCarla.nogui, int):
if gCarla.nogui and not isinstance(gCarla.nogui, bool):
if os.fork():
# pylint: disable=protected-access
os._exit(0)


Loading…
Cancel
Save