mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 11:06:32 +00:00
Fix supervisor update flow with apparmor (#1551)
This commit is contained in:
parent
6d39b4d7cd
commit
3d555f951d
@ -73,7 +73,7 @@ class AppArmorControl(CoreSysAttributes):
|
|||||||
# Copy to AppArmor folder
|
# Copy to AppArmor folder
|
||||||
dest_profile = Path(self.sys_config.path_apparmor, profile_name)
|
dest_profile = Path(self.sys_config.path_apparmor, profile_name)
|
||||||
try:
|
try:
|
||||||
shutil.copy(profile_file, dest_profile)
|
shutil.copyfile(profile_file, dest_profile)
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
_LOGGER.error("Can't copy %s: %s", profile_file, err)
|
_LOGGER.error("Can't copy %s: %s", profile_file, err)
|
||||||
raise HostAppArmorError() from None
|
raise HostAppArmorError() from None
|
||||||
|
@ -115,7 +115,7 @@ class Supervisor(CoreSysAttributes):
|
|||||||
|
|
||||||
_LOGGER.info("Update Supervisor to version %s", version)
|
_LOGGER.info("Update Supervisor to version %s", version)
|
||||||
try:
|
try:
|
||||||
await self.instance.update(version, latest=True)
|
await self.instance.install(version, image=None, latest=True)
|
||||||
except DockerAPIError:
|
except DockerAPIError:
|
||||||
_LOGGER.error("Update of Supervisor fails!")
|
_LOGGER.error("Update of Supervisor fails!")
|
||||||
raise SupervisorUpdateError() from None
|
raise SupervisorUpdateError() from None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user