From 21303069f6f75cc4e74d5bb408e0beee0097b3fd Mon Sep 17 00:00:00 2001 From: bernat Date: Tue, 5 Oct 2004 18:20:17 +0200 Subject: [PATCH] On gere le cas ou l'on ne trouve pas l'adresse MAC darcs-hash:20041005162017-d1718-8bf80485fb016344e7c1d7c73c56f595c0d98218.gz --- gestion/locate-mac.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gestion/locate-mac.py b/gestion/locate-mac.py index 16476a5d..a7b9820f 100755 --- a/gestion/locate-mac.py +++ b/gestion/locate-mac.py @@ -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