On gere le cas ou l'on ne trouve pas l'adresse MAC

darcs-hash:20041005162017-d1718-8bf80485fb016344e7c1d7c73c56f595c0d98218.gz
This commit is contained in:
bernat 2004-10-05 18:20:17 +02:00
parent 32992e1351
commit 21303069f6

View file

@ -8,4 +8,7 @@ from sys import argv
for switch in ['backbone'] + all_switchs():
prise = hpswitch(switch).where_is_mac(argv[1])
print "%-10s: %d" % (switch, prise)
if prise != None:
print "%-10s: %d" % (switch, prise)
else:
print "%-10s: non trouvé" % switch