From 3829203a829d6ad45e288d951e87996e6c475944 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 25 Apr 2009 02:28:12 +0200 Subject: [PATCH] [hptools] sre est deprecated (3) Ignore-this: 46cd3fb04d294ece3e22c744089a79d darcs-hash:20090425002812-ffbb2-d142fa30e5c05c62261e3a99762df5a78f2f8121.gz --- gestion/hptools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 :