From a7bc6965147e5f371f048fb1ad72086417ca2c1f Mon Sep 17 00:00:00 2001 From: salles Date: Fri, 12 Nov 2004 19:53:35 +0100 Subject: [PATCH] Mise en forme correcte de l'adresse mac darcs-hash:20041112185335-72cb0-2456059855950cf3be218faa13bdad45e9badf07.gz --- gestion/locate-mac.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gestion/locate-mac.py b/gestion/locate-mac.py index 32dc6ad8..ac50c0ae 100755 --- a/gestion/locate-mac.py +++ b/gestion/locate-mac.py @@ -6,9 +6,11 @@ from annuaires import reverse, all_switchs from hptools import hpswitch from sys import argv +mac = ":".join([i.zfill(2) for i in argv[1].split(":")]).lower() + for switch in ['backbone'] + all_switchs(): sw = hpswitch(switch) - prise = sw.where_is_mac(argv[1]) + prise = sw.where_is_mac(mac) if prise != None: print "%-10s: %d (%s)" % (switch, prise, sw.nom(None, prise)) else: