mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-14 14:18:40 +02:00
Fix so-yaml addKey crash when intermediate key has None value
This commit is contained in:
@@ -256,7 +256,7 @@ def replacelistobject(args):
|
|||||||
def addKey(content, key, value):
|
def addKey(content, key, value):
|
||||||
pieces = key.split(".", 1)
|
pieces = key.split(".", 1)
|
||||||
if len(pieces) > 1:
|
if len(pieces) > 1:
|
||||||
if not pieces[0] in content:
|
if pieces[0] not in content or content[pieces[0]] is None:
|
||||||
content[pieces[0]] = {}
|
content[pieces[0]] = {}
|
||||||
addKey(content[pieces[0]], pieces[1], value)
|
addKey(content[pieces[0]], pieces[1], value)
|
||||||
elif key in content:
|
elif key in content:
|
||||||
|
|||||||
Reference in New Issue
Block a user