OP-1117 - cleaned up use of default value

This commit is contained in:
Petr Kalis 2022-01-26 17:56:19 +01:00
parent 270b0d863c
commit e836416513
4 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@ class AddLastWorkfileToLaunchArgs(PreLaunchHook):
]
def execute(self):
if not self.data.get("start_last_workfile", True):
if not self.data.get("start_last_workfile"):
self.log.info("It is set to not start last workfile on start.")
return

View file

@ -43,7 +43,7 @@ class GlobalHostDataHook(PreLaunchHook):
"env": self.launch_context.env,
"start_last_workfile": self.data.get("start_last_workfile", True),
"start_last_workfile": self.data.get("start_last_workfile"),
"last_workfile_path": self.data.get("last_workfile_path"),
"log": self.log

View file

@ -41,7 +41,7 @@ class NonPythonHostHook(PreLaunchHook):
# Add workfile path if exists
workfile_path = self.data["last_workfile_path"]
if (
self.data.get("start_last_workfile", True)
self.data.get("start_last_workfile")
and workfile_path
and os.path.exists(workfile_path)):
new_launch_args.append(workfile_path)