printing: vlan_list None -> prob hptools ?
This commit is contained in:
parent
eaaf97b246
commit
ce1b5572ff
1 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,8 @@ def prise_etat(chbre):
|
|||
except Exception as e:
|
||||
return style(u"hptools2 failed (%r)" % e, "rouge")
|
||||
vlan_list = switch.get_vlans(port)
|
||||
if vlan_list is None:
|
||||
return style(u"vlan_list is empty (hptools failed ?)", "rouge")
|
||||
|
||||
vlans = u" " * (13 + len(chbre))
|
||||
vlans += u"Vlan%s : " % (u's' if len(vlan_list) > 1 else u"",) + style(u", ".join([unicode(vlan) for vlan in vlan_list]), "orange")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue