From 234543fae07b8d7d615ae335e7c0440e5613836a Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 19 May 2015 11:30:11 +0200 Subject: [PATCH] Cleanup --- source/carla | 2 +- source/carla-control | 2 +- source/carla-patchbay | 2 +- source/carla-rack | 2 +- source/carla_database.py | 2 +- source/carla_settings.py | 2 +- source/carla_shared.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/carla b/source/carla index c41776977..0958b1f04 100755 --- a/source/carla +++ b/source/carla @@ -28,7 +28,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Read CLI args - initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else sys.argv[0]) + initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) # ------------------------------------------------------------- # App initialization diff --git a/source/carla-control b/source/carla-control index f2a5c62f2..16059d7d6 100755 --- a/source/carla-control +++ b/source/carla-control @@ -28,7 +28,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Read CLI args - initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else sys.argv[0]) + initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) for arg in sys.argv: if arg.startswith("osc."): diff --git a/source/carla-patchbay b/source/carla-patchbay index cbe1595ed..3b315558c 100755 --- a/source/carla-patchbay +++ b/source/carla-patchbay @@ -28,7 +28,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Read CLI args - initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else sys.argv[0]) + initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) # ------------------------------------------------------------- # App initialization diff --git a/source/carla-rack b/source/carla-rack index 4aec35ebd..74ab0a7f1 100755 --- a/source/carla-rack +++ b/source/carla-rack @@ -28,7 +28,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Read CLI args - initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else sys.argv[0]) + initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) # ------------------------------------------------------------- # App initialization diff --git a/source/carla_database.py b/source/carla_database.py index 9eccd5665..03df55619 100755 --- a/source/carla_database.py +++ b/source/carla_database.py @@ -1708,7 +1708,7 @@ if __name__ == '__main__': from carla_app import CarlaApplication from carla_host import initHost, loadHostSettings - initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else sys.argv[0]) + initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) app = CarlaApplication("Carla2-Database", libPrefix) host = initHost("Carla2-Database", libPrefix, False, False, False) diff --git a/source/carla_settings.py b/source/carla_settings.py index aa6c830f1..7255db1b7 100755 --- a/source/carla_settings.py +++ b/source/carla_settings.py @@ -851,7 +851,7 @@ if __name__ == '__main__': from carla_app import CarlaApplication from carla_host import initHost, loadHostSettings - initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else sys.argv[0]) + initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) app = CarlaApplication("Carla2-Settings", libPrefix) host = initHost("Carla2-Settings", libPrefix, False, False, False) diff --git a/source/carla_shared.py b/source/carla_shared.py index bba2b7933..8bbcb6fec 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -545,7 +545,7 @@ def getIcon(icon, size = 16): # Handle some basic command-line arguments shared between all carla variants def handleInitialCommandLineArguments(file): - initName = os.path.basename(file) if ("__file__" in dir() and os.path.dirname(file) in PATH) else sys.argv[0] + initName = os.path.basename(file) if (file is not None and os.path.dirname(file) in PATH) else sys.argv[0] libPrefix = None for arg in sys.argv[1:]: