Skip to content

Commit

Permalink
status_events: Fix python 2 compat bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh committed May 30, 2023
1 parent 9d059e4 commit b53e538
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion status_events.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ gcode:
# Change the current status.
{% elif ACTION == "CHANGE" %}
{% if params.RESET_STACK|default(0)|int %}
{% set dummy = status_stack.clear() %}
{% for dummy in range(status_stack|length) %}
{% set dummy = status_stack.pop() %}
{% endfor %}
# TODO: Once python 3 is required, switch the for loop above to this:
#{% set dummy = status_stack.clear() %}
{% elif STATUS == "pop_status" %}
{% set STATUS = (status_stack|default(['ready'], True)).pop() %}
{% endif %}
Expand Down

0 comments on commit b53e538

Please sign in to comment.