File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -525,15 +525,12 @@ def show_table(self, table_name):
525
525
if not val ["ports" ]:
526
526
data .append ([key , val ["type" ], "" , val ["policy_desc" ]])
527
527
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 , "" ])
537
534
538
535
print (tabulate .tabulate (data , headers = header , tablefmt = "simple" , missingval = "" ))
539
536
You can’t perform that action at this time.
0 commit comments