Skip to content

Commit

Permalink
[acl_loader/main.py]: Use get to fetch key 'ports'. (sonic-net#27)
Browse files Browse the repository at this point in the history
Reason:show command must work even when Ports does not exist in ACL_TABLE.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
  • Loading branch information
Praveen Chaudhary committed Jun 30, 2020
1 parent adb0521 commit 6c20b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def show_table(self, table_name):
for service in services[1:]:
data.append(["", "", service, "", ""])
else:
if not val["ports"]:
if not val.get("ports"):
data.append([key, val["type"], "", val["policy_desc"], stage])
else:
ports = natsorted(val["ports"])
Expand Down

0 comments on commit 6c20b42

Please sign in to comment.