Message ID | 20231217131129.3217772-1-richard.purdie@linuxfoundation.org |
---|---|
State | Accepted, archived |
Commit | 0b37fe89ba12549109905b6d0e6d07d342162436 |
Headers | show |
Series | utils: Fix mkdir with PosixPath | expand |
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)
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(-)