diff --git a/gestion/hptools.py b/gestion/hptools.py index cab3a8fc..68e08cfc 100644 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -447,7 +447,7 @@ class sw_prise(sw_chbre): if __name__ == '__main__' : - import sys, getopt, sre + import sys, getopt, re try : options, arg = getopt.getopt(sys.argv[1:], 'U:hc:', [ 'help', 'snmp' ]) @@ -480,9 +480,9 @@ if __name__ == '__main__' : # Quels switchs ? switchs=[] if arg : - re=sre.compile(arg[0]) + rexp=re.compile(arg[0]) for sw in all_switchs() : - if re.match(sw) : + if rexp.match(sw) : switchs.append(sw) if not switchs :