configd: minor regrssion in deeper nested command structures. when the requested path doesn't exist it may run out of boundaries (returning an empty string).

error in question:
.. line 310, in find_action     while type(target) is dict and action[0] in target: IndexError: list index out of range ...
This commit is contained in:
Ad Schellevis 2023-07-08 14:28:46 +02:00
parent 1fa623cfd9
commit ebbc480ac2

View File

@ -307,7 +307,7 @@ class ActionHandler(object):
:return: action object or None if not found
"""
target = self.action_map
while type(target) is dict and action[0] in target:
while type(target) is dict and len(action) > 0 and action[0] in target:
tmp = action.pop(0)
target = target[tmp]