From a90c7a0f9029a7587d9bc35182615ce31028bda5 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:05:48 +0200 Subject: [PATCH] update lookup set --- client/ayon_core/lib/execute.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/lib/execute.py b/client/ayon_core/lib/execute.py index 23da34b6fa..bc55c27bd8 100644 --- a/client/ayon_core/lib/execute.py +++ b/client/ayon_core/lib/execute.py @@ -211,11 +211,11 @@ def run_ayon_launcher_process(*args, add_sys_paths=False, **kwargs): if add_sys_paths: new_pythonpath = list(sys.path) - pp_set = set(new_pythonpath) - pythonpath = env.get("PYTHONPATH") or "" - for path in frozenset(pythonpath.split(os.pathsep)): - if path and path not in pp_set: + lookup_set = set(new_pythonpath) + for path in (env.get("PYTHONPATH") or "").split(os.pathsep): + if path and path not in lookup_set: new_pythonpath.append(path) + lookup_set.add(path) env["PYTHONPATH"] = os.pathsep.join(new_pythonpath) return run_subprocess(args, env=env, **kwargs)