diff --git a/gestion/hptools.py b/gestion/hptools.py index 12e4437b..ac804ab6 100755 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -16,6 +16,7 @@ from commands import getstatusoutput from annuaires import chbre_prises, all_switchs from os.path import exists from os import system +from sre import findall try: from secrets import config_snmp_secrete @@ -190,7 +191,7 @@ class hpswitch : if self.__debug : self.__logDest.write("HP DEBUG : show_prise_mac(prise=%s)\n" % prise) try: data = self.walk('STATISTICS-MIB::hpSwitchPortFdbAddress.%d' % int(prise)) - return map(lambda x:":".join(x[1:-2].lower().split(" ")),data.values()) + return map(lambda x:findall('".*"',":".join(x.lower().split(' ')))[0][1:-1],data.values()) except ValueError: # Pas de MAC trouvée return []