install: use pathlib.Path.write_bytes construct instead of open + write
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
parent
092cbf14df
commit
2d8a1ea9b3
|
@ -752,8 +752,7 @@ class InstallController(SubiquityController):
|
|||
else:
|
||||
apt_conf_contents += uu_apt_conf_update_security
|
||||
apt_conf_path = Path(aptdir) / "zzzz-temp-installer-unattended-upgrade"
|
||||
with open(apt_conf_path, "wb") as apt_conf:
|
||||
apt_conf.write(apt_conf_contents)
|
||||
apt_conf_path.write_bytes(apt_conf_contents)
|
||||
try:
|
||||
self.unattended_upgrades_ctx = context
|
||||
self.unattended_upgrades_cmd = await start_curtin_command(
|
||||
|
|
Loading…
Reference in New Issue