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:
Giuseppe Scrivano 2014-05-21 09:31:22 +02:00
parent 4f056dcba9
commit b84f8cb406
1 changed files with 1 additions and 1 deletions

View File

@ -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