conftree: also decode empty values
This commit is contained in:
parent
e9b5bd4303
commit
6daba6884f
@ -115,7 +115,7 @@ class ConfSimple(object):
|
||||
sk = sk.encode('utf-8')
|
||||
#v = ConfSimple.getbin(self, nm, sk)
|
||||
v = self.getbin(nm, sk)
|
||||
if v and dodecode:
|
||||
if v is not None and dodecode:
|
||||
v = v.decode('utf-8')
|
||||
return v
|
||||
|
||||
@ -257,7 +257,7 @@ class ConfStack(object):
|
||||
sk = sk.encode('utf-8')
|
||||
#v = ConfSimple.getbin(self, nm, sk)
|
||||
v = self.getbin(nm, sk)
|
||||
if v and dodecode:
|
||||
if v is not None and dodecode:
|
||||
v = v.decode('utf-8')
|
||||
return v
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user