Skip to content

Commit

Permalink
osinfo-query fixes
Browse files Browse the repository at this point in the history
- osinfo-query does not list virtio26, add it manually to the list for
  fallback
- Use -f short-id option to osinfo-query
  • Loading branch information
opoplawski committed Jul 21, 2016
1 parent b54e2f8 commit 4e623b8
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 @@ -77,10 +77,12 @@
try:
# maybe on newer os using osinfo-query?
rc, response = utils.subprocess_get_response(
shlex.split('osinfo-query os'))
shlex.split('osinfo-query -f short-id os'))
variants = response.split('\n')
for variant in variants:
supported_variants.add(variant.split()[0])
supported_variants.add(variant.strip())
# osinfo-query does not list virtio26, add it here for fallback
supported_variants.add('virtio26')
except:
# okay, probably on old os and we'll just use generic26
pass
Expand Down

0 comments on commit 4e623b8

Please sign in to comment.