From 37db18a6300b4014c300dc378e2422106e006fb5 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 6 Apr 2021 10:13:57 +0200 Subject: [PATCH] better while loop logic --- openpype/lib/applications.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index e5bfe679d1..6ce2ec297d 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -858,7 +858,10 @@ class ApplicationLaunchContext: Return: list: Unpacked arguments. """ - while True: + if isinstance(args, str): + return args + all_cleared = False + while not all_cleared: all_cleared = True new_args = [] for arg in args: @@ -870,8 +873,6 @@ class ApplicationLaunchContext: new_args.append(arg) args = new_args - if all_cleared: - break return args