diff --git a/surveillance/mac_prises/mac_prise.py b/surveillance/mac_prises/mac_prise.py index 13c43dd0..0da02adf 100755 --- a/surveillance/mac_prises/mac_prise.py +++ b/surveillance/mac_prises/mac_prise.py @@ -33,7 +33,7 @@ def liste_chambres_macs(switch, annuaire): split = switch.replace('.adm.crans.org', '').split('-') bat, num_switch = split[0][-1], int(split[1][0]) if bat not in liste_bats: - print 'Le bâtiment '+bat+' ne figure pas dans la liste des bâtiments.' + return {} data = walk(switch, 'STATISTICS-MIB::hpSwitchPortFdbAddress') liste_chbres = [] diff --git a/surveillance/mac_prises/mac_prise_holder.py b/surveillance/mac_prises/mac_prise_holder.py index b22da4d8..ce9b56c3 100755 --- a/surveillance/mac_prises/mac_prise_holder.py +++ b/surveillance/mac_prises/mac_prise_holder.py @@ -64,7 +64,7 @@ if __name__ == '__main__': On envoie sur n threads les n arguments, puis on récupère les sorties et on les enregistre dans une base postgresql """ - switches = annuaires_pg.all_switches() + switches = annuaires_pg.all_switchs() date = time.strftime('%F %T') threads = {} output = {}