Unreachable code in backend_iptables.py, set_rule()
Bug #1927734 reported by
paul janssen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ufw |
Fix Released
|
Low
|
Jamie Strandboge |
Bug Description
ufw --version 0.36 and trunk code.
Small one:
I spotted this one in backend_
Snippet:
# bail if we have a bad position
if position < 0 or position > len(rules):
err_msg = _("Invalid position '%d'") % (position)
raise UFWError(err_msg)
if position > 0 and rule.remove:
err_msg = _("Cannot specify insert and delete")
raise UFWError(err_msg)
if position > len(rules):
err_msg = _("Cannot insert rule at position '%d'") % position
raise UFWError(err_msg)
The last then part will never be executed because the condition is already caught by the first if-then.
summary: |
- Unreachable code in backen_iptables.py, set_rule() + Unreachable code in backend_iptables.py, set_rule() |
To post a comment you must log in.
Thanks for the report! This is now fixed in trunk.