From: "nicusor.huhulea@siemens.com" <nicusor.huhulea@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: [PATCH] template.bbclass: fix warning by using a raw string for regular expressions
Date: Mon, 11 Mar 2024 13:44:35 +0000 [thread overview]
Message-ID: <DB3PR10MB690833DFB0549256DC3F56FFE6242@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM> (raw)
the warning is:
DEBUG: Executing python function do_transform_template
/build/../work/isar/meta/classes/template.bbclass:24: DeprecationWarning: invalid escape sequence '\$'
fix this by adding 'r' before opening quote in order to treat the string
as raw string, preventing the interpretation of backslashes as escape characters
Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
diff --git a/meta/classes/template.bbclass b/meta/classes/template.bbclass
index 1f4cedbd..7f8d5d8f 100644
--- a/meta/classes/template.bbclass
+++ b/meta/classes/template.bbclass
@@ -21,7 +21,7 @@ python do_transform_template() {
return
cmd = "envsubst"
- args = " ".join("\${{{}}}".format(i) for i in template_vars)
+ args = " ".join(r"\${{{}}}".format(i) for i in template_vars)
# Copy current process environment and add template variables
# from bitbake data store:
next reply other threads:[~2024-03-11 13:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 13:44 nicusor.huhulea [this message]
2024-03-15 13:01 ` Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB3PR10MB690833DFB0549256DC3F56FFE6242@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM \
--to=nicusor.huhulea@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox