Skip to content

Commit a7a1c4a

Browse files
committed
boot-qemu.py: Use .open() with pathlib object
Clears up ruff warning: boot-qemu.py:211:14: PTH123 `open("foo")` should be replaced by `Path("foo").open()` Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent bdd0ce4 commit a7a1c4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

boot-qemu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def get_smp_value(args):
208208
# CONFIG_NR_CPUS then get the actual value if possible.
209209
config_nr_cpus = 8
210210
if config_file:
211-
with open(config_file, encoding='utf-8') as file:
211+
with config_file.open(encoding='utf-8') as file:
212212
for line in file:
213213
if "CONFIG_NR_CPUS=" in line:
214214
config_nr_cpus = int(line.split("=", 1)[1])

0 commit comments

Comments
 (0)