Skip to content

Commit

Permalink
[acl_loader]: Prevent crash in the event ac ACL entry has no 'MATCH' …
Browse files Browse the repository at this point in the history
…fields (sonic-net#444)

Signed-off-by: Pavlo Yadvychuk [email protected]
  • Loading branch information
Pavlo Yadvichuk authored and jleveque committed Jan 28, 2019
1 parent 9e49466 commit 2619fea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ def show_rule(self, table_name, rule_id):

matches.sort()

if len(matches) == 0:
matches.append("N/A")

rule_data = [[tname, rid, priority, action, matches[0]]]
if len(matches) > 1:
for m in matches[1:]:
Expand Down

0 comments on commit 2619fea

Please sign in to comment.