diff options
-rwxr-xr-x | Lib/irix5/flp.py | 7 | ||||
-rwxr-xr-x | Lib/plat-irix5/flp.py | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/Lib/irix5/flp.py b/Lib/irix5/flp.py index fcc95f0..39b45dc 100755 --- a/Lib/irix5/flp.py +++ b/Lib/irix5/flp.py @@ -250,12 +250,13 @@ _parse_func = { \ # This function parses a line, and returns either # a string or a tuple (name,value) -import regexp +import regex +prog = regex.compile('^\([^:]*\): *\(.*\)') def _parse_line(line): - a = regexp.match('^([^:]*): *(.*)', line) - if not a: + if prog.match(line) < 0: return line + a = prog.regs name = line[:a[1][1]] if name[0] == 'N': name = string.joinfields(string.split(name),'') diff --git a/Lib/plat-irix5/flp.py b/Lib/plat-irix5/flp.py index fcc95f0..39b45dc 100755 --- a/Lib/plat-irix5/flp.py +++ b/Lib/plat-irix5/flp.py @@ -250,12 +250,13 @@ _parse_func = { \ # This function parses a line, and returns either # a string or a tuple (name,value) -import regexp +import regex +prog = regex.compile('^\([^:]*\): *\(.*\)') def _parse_line(line): - a = regexp.match('^([^:]*): *(.*)', line) - if not a: + if prog.match(line) < 0: return line + a = prog.regs name = line[:a[1][1]] if name[0] == 'N': name = string.joinfields(string.split(name),'') |