Skip to content

Commit 55adeb2

Browse files
committed
utils.py: Fix joining possible_files in find_first_file()
Fix the following backtrace: Traceback (most recent call last): File ".../boot-qemu.py", line 870, in <module> launch_qemu(config) File ".../boot-qemu.py", line 770, in launch_qemu virtiofsd = utils.find_first_file(qemu_prefix, virtiofsd_locations) File ".../utils.py", line 52, in find_first_file f"No files from list ('{', '.join(possible_files)}') could be found within '{relative_root}'!" TypeError: sequence item 0: expected str instance, PosixPath found Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 01d7592 commit 55adeb2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ def find_first_file(relative_root, possible_files):
4848
for possible_file in possible_files:
4949
if (full_path := relative_root.joinpath(possible_file)).exists():
5050
return full_path
51+
52+
files_str = "', '".join([str(elem) for elem in possible_files])
5153
raise Exception(
52-
f"No files from list ('{', '.join(possible_files)}') could be found within '{relative_root}'!"
54+
f"No files from list ('{files_str}') could be found within '{relative_root}'!"
5355
)
5456

5557

0 commit comments

Comments
 (0)