mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-24 21:34:47 +03:00
osdict: Prevent traceback in the logs when detection fails
This commit is contained in:
parent
b1236c1af0
commit
6ed988ebfc
@ -593,6 +593,6 @@ def lookup_os_by_media(location):
|
||||
loader = _get_os_loader()
|
||||
media = libosinfo.Media.create_from_location(location, None)
|
||||
ret = loader.get_db().guess_os_from_media(media)
|
||||
if ret and len(ret) > 0:
|
||||
if ret and len(ret) > 0 and ret[0]:
|
||||
return ret[0].get_short_id()
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user