File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1232,8 +1232,14 @@ def brief(verbose):
1232
1232
# vlan_dhcp_helper_dict={}, vlan_ip_dict = {}, vlan_ports_dict = {}
1233
1233
for key in natsorted (vlan_dhcp_helper_dict .keys ()):
1234
1234
dhcp_helpers = ',' .replace (',' , '\n ' ).join (vlan_dhcp_helper_dict [key ])
1235
- ip_address = ',' .replace (',' , '\n ' ).join (vlan_ip_dict [key ])
1236
- vlan_ports = ',' .replace (',' , '\n ' ).join ((vlan_ports_dict [key ]))
1235
+ if key not in vlan_ip_dict :
1236
+ ip_address = ""
1237
+ else :
1238
+ ip_address = ',' .replace (',' , '\n ' ).join (vlan_ip_dict [key ])
1239
+ if key not in vlan_ports_dict :
1240
+ vlan_ports = ""
1241
+ else :
1242
+ vlan_ports = ',' .replace (',' , '\n ' ).join ((vlan_ports_dict [key ]))
1237
1243
body .append ([key , ip_address , vlan_ports , dhcp_helpers ])
1238
1244
click .echo (tabulate (body , header , tablefmt = "grid" ))
1239
1245
You can’t perform that action at this time.
0 commit comments