Skip to content

Commit

Permalink
Suppress "virt-install --os-variant list" error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jul 21, 2016
1 parent 4e623b8 commit 7fab696
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions koan/virtinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
supported_variants.add(variant)
except:
try:
rc, response = utils.subprocess_get_response(
shlex.split('virt-install --os-variant list'))
# This will fail on EL7+, gobble stderr to avoid confusing error
# messages from being output
rc, response, stderr_respose = utils.subprocess_get_response(
shlex.split('virt-install --os-variant list'), False, True)
variants = response.split('\n')
for variant in variants:
supported_variants.add(variant.split()[0])
Expand Down

0 comments on commit 7fab696

Please sign in to comment.