osdict: fix default value for devices data
commit 4f056dcba9
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)
|
||||
val = getattr(os, key)
|
||||
if isfunction(val):
|
||||
return val()
|
||||
val = val()
|
||||
if val == _SENTINEL:
|
||||
val = default
|
||||
return val
|
||||
|
|
Loading…
Reference in New Issue