ci/b2c: use with:write instead of manually doing open;write;close
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
This commit is contained in:

committed by
Marge Bot

parent
50da22812d
commit
b2e78a9775
@@ -97,6 +97,5 @@ values['local_container'] = values['local_container'].replace(
|
||||
|
||||
values['cmdline_extras'] = environ.get('B2C_KERNEL_CMDLINE_EXTRAS', '')
|
||||
|
||||
f = open(path.splitext(path.basename(args.template))[0], "w")
|
||||
f.write(template.render(values))
|
||||
f.close()
|
||||
with open(path.splitext(path.basename(args.template))[0], "w") as f:
|
||||
f.write(template.render(values))
|
||||
|
Reference in New Issue
Block a user