unbound, some weird duplicate key in output, for https://github.com/opnsense/core/issues/3302

This commit is contained in:
Ad Schellevis 2019-03-10 12:00:22 +01:00
parent 08a3828e66
commit 64c7d46049

View File

@ -91,7 +91,7 @@ elif args.stats:
ptr = output
while len(keys) > 0 :
key = keys.pop(0)
if len(keys) == 0:
if len(keys) == 0 and type(ptr[key]) == dict:
ptr[key] = value.strip()
elif key not in ptr:
ptr[key] = dict()