Skip to content

Commit

Permalink
stateengine plugin: fix previous implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
onkelandy committed Sep 16, 2023
1 parent c3d1036 commit 1e1e6b2
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions stateengine/StateEngineFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def check_include_exclude(entry_type):
return returnvalue
elog.info("{0}: not matching", e)
elog.decrease_indent()
return None

item = self.itemsApi.return_item(item_id)
if item is None:
Expand Down Expand Up @@ -139,16 +140,23 @@ def check_include_exclude(entry_type):
return retval_no_trigger

if "se_manual_on" in item.conf:
check_include_exclude("on")
returnvalue = check_include_exclude("on")
if returnvalue is not None:
return returnvalue

if "se_manual_exclude" in item.conf:
check_include_exclude("exclude")
returnvalue = check_include_exclude("exclude")
if returnvalue is not None:
return returnvalue

if "se_manual_include" in item.conf:
check_include_exclude("include")
# Current value not in list -> Return "No Trigger
elog.info("No include values matching. Writing value {0}", retval_no_trigger)
return retval_no_trigger
returnvalue = check_include_exclude("include")
if returnvalue is not None:
return returnvalue
else:
# Current value not in list -> Return "No Trigger
elog.info("No include values matching. Writing value {0}", retval_no_trigger)
return retval_no_trigger
else:
# No include-entries -> return "Trigger"
elog.info("No include limitation. Writing value {0}", retval_trigger)
Expand Down

0 comments on commit 1e1e6b2

Please sign in to comment.