mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-24 02:04:13 +03:00
osdict: fix default value for devices data
commit 4f056dcba97bc337dcd35fe0cfb62417ac09d036 didn't take into account the default value. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
4f056dcba9
commit
b84f8cb406
@ -578,7 +578,7 @@ def lookup_osdict_key(variant, key, default):
|
|||||||
raise ValueError("Unknown osdict property '%s'" % key)
|
raise ValueError("Unknown osdict property '%s'" % key)
|
||||||
val = getattr(os, key)
|
val = getattr(os, key)
|
||||||
if isfunction(val):
|
if isfunction(val):
|
||||||
return val()
|
val = val()
|
||||||
if val == _SENTINEL:
|
if val == _SENTINEL:
|
||||||
val = default
|
val = default
|
||||||
return val
|
return val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user