Fix supervisor update flow with apparmor (#1551)

This commit is contained in:
Pascal Vizeli 2020-02-29 23:07:34 +01:00 committed by GitHub
parent 6d39b4d7cd
commit 3d555f951d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class AppArmorControl(CoreSysAttributes):
# Copy to AppArmor folder
dest_profile = Path(self.sys_config.path_apparmor, profile_name)
try:
shutil.copy(profile_file, dest_profile)
shutil.copyfile(profile_file, dest_profile)
except OSError as err:
_LOGGER.error("Can't copy %s: %s", profile_file, err)
raise HostAppArmorError() from None

View File

@ -115,7 +115,7 @@ class Supervisor(CoreSysAttributes):
_LOGGER.info("Update Supervisor to version %s", version)
try:
await self.instance.update(version, latest=True)
await self.instance.install(version, image=None, latest=True)
except DockerAPIError:
_LOGGER.error("Update of Supervisor fails!")
raise SupervisorUpdateError() from None