Fix assert and remove unneeded assignment

This commit is contained in:
MKLeb 2023-08-07 19:39:57 -04:00 committed by Pedro Algarvio
parent b3fcdf8bfd
commit 6e5dc3cd87

View file

@ -363,7 +363,7 @@ class SaltPkgInstall:
ret = self.proc.run(self.pkg_mngr, "install", "-y", *self.pkgs)
if not platform.is_darwin() and not platform.is_windows():
# Make sure we don't have any trailing references to old package file locations
ret.returncode == 0
assert ret.returncode == 0
assert "/saltstack/salt/run" not in ret.stdout
log.info(ret)
self._check_retcode(ret)
@ -479,12 +479,11 @@ class SaltPkgInstall:
f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver} {self.distro_codename} main"
)
self._check_retcode(ret)
pkgs_to_install = self.salt_pkgs
cmd = [
self.pkg_mngr,
"install",
*pkgs_to_install,
*self.salt_pkgs,
"-y",
]