From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH] utils: Fix mkdir with PosixPath
Date: Sun, 17 Dec 2023 13:11:29 +0000 [thread overview]
Message-ID: <20231217131129.3217772-1-richard.purdie@linuxfoundation.org> (raw)
Avoid:
Exception: AttributeError: 'PosixPath' object has no attribute 'find'
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index d299b2efdb..52a136f809 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -759,7 +759,7 @@ def mkdirhier(directory):
"""Create a directory like 'mkdir -p', but does not complain if
directory already exists like os.makedirs
"""
- if directory.find('${') != -1:
+ if '${' in directory:
bb.fatal("Directory name {} contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution.".format(directory))
try:
os.makedirs(directory)
--
2.39.2
reply other threads:[~2023-12-17 13:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231217131129.3217772-1-richard.purdie@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).