From f387f42cd9c5fffcacad2abf758eec14e49b1e22 Mon Sep 17 00:00:00 2001 From: Alexander Tiderko Date: Thu, 14 Dec 2023 13:19:12 +0100 Subject: [PATCH] fixed path interpret if arg was not resolved --- fkie_multimaster_pylib/fkie_multimaster_pylib/launch/xml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fkie_multimaster_pylib/fkie_multimaster_pylib/launch/xml.py b/fkie_multimaster_pylib/fkie_multimaster_pylib/launch/xml.py index fd2a5ede..91fc0dde 100644 --- a/fkie_multimaster_pylib/fkie_multimaster_pylib/launch/xml.py +++ b/fkie_multimaster_pylib/fkie_multimaster_pylib/launch/xml.py @@ -390,7 +390,9 @@ def find_included_files(string: str, # try to resolve path fname = replace_arg(fname, resolve_args_all) fname = replace_arg(fname, resolve_args_intern) - fname = interpret_path(fname, pwd) + if fname.find('$(arg ') == -1: + # do not try to resolve if not all args are replaced + fname = interpret_path(fname, pwd) except Exception as err: Log.warn(f"Interpret file failed: {err}") if os.path.isdir(fname):