mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
gracefully handle missing parent key
This commit is contained in:
@@ -170,7 +170,7 @@ def replace(args):
|
||||
|
||||
def getKeyValue(content, key):
|
||||
pieces = key.split(".", 1)
|
||||
if len(pieces) > 1:
|
||||
if len(pieces) > 1 and pieces[0] in content:
|
||||
return getKeyValue(content[pieces[0]], pieces[1])
|
||||
return content.get(key, None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user