Skip to content

Commit

Permalink
Add interval for package install to avoid no exit status issues
Browse files Browse the repository at this point in the history
Signed-off-by: Kylazhang <[email protected]>
  • Loading branch information
kylazhang committed Mar 19, 2018
1 parent 9d0e9ae commit c22f456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virttest/utils_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def is_installed(self, pkg_name):
cmd = self.query_cmd + pkg_name
return not self.session.cmd_status(cmd)

def operate(self, timeout, default_status):
def operate(self, timeout, default_status, internal_timeout=2):
"""
Run command and return status
Expand All @@ -99,7 +99,7 @@ def operate(self, timeout, default_status):
need = True
if need:
cmd = self.cmd + pkg
if self.session.cmd_status(cmd, timeout):
if self.session.cmd_status(cmd, timeout, internal_timeout):
# Try to clean the repo db and re-try installation
if not self.clean():
logging.error("Package %s was broken", self.package_manager)
Expand Down

0 comments on commit c22f456

Please sign in to comment.