Skip to content

Commit 538301d

Browse files
authored
Revert "show acl table command output should show binding column correctly even with single port (sonic-net#447)" (sonic-net#589)
This reverts commit ff8fec4.
1 parent ff8fec4 commit 538301d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

acl_loader/main.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -525,15 +525,12 @@ def show_table(self, table_name):
525525
if not val["ports"]:
526526
data.append([key, val["type"], "", val["policy_desc"]])
527527
else:
528-
if isinstance(val["ports"], list):
529-
ports = natsorted(val["ports"])
530-
data.append([key, val["type"], ports[0], val["policy_desc"]])
531-
532-
if len(ports) > 1:
533-
for port in ports[1:]:
534-
data.append(["", "", port, ""])
535-
else:
536-
data.append([key, val["type"], val["ports"], val["policy_desc"]])
528+
ports = natsorted(val["ports"])
529+
data.append([key, val["type"], ports[0], val["policy_desc"]])
530+
531+
if len(ports) > 1:
532+
for port in ports[1:]:
533+
data.append(["", "", port, ""])
537534

538535
print(tabulate.tabulate(data, headers=header, tablefmt="simple", missingval=""))
539536

0 commit comments

Comments
 (0)