printing: vlan_list None -> prob hptools ?

This commit is contained in:
Daniel STAN 2015-07-04 17:42:47 +02:00
parent eaaf97b246
commit ce1b5572ff

View file

@ -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")