mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-03-14 00:35:32 +01: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):
|
||||
pieces = key.split(".", 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]] = {}
|
||||
addKey(content[pieces[0]], pieces[1], value)
|
||||
elif key in content:
|
||||
|
||||
Reference in New Issue
Block a user