|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
set_separator/regexpHi,
it seems I have a tendency to try out new code paths ;-) The latest one is: <set_separation> <regexp>.*(?:foo|bar).*</regexp> </set_separation> which leads to: Traceback (most recent call last): File "/Projects/software/perfbase/bin/pb_input.py", line 4012, in ? main() File "/Projects/software/perfbase/bin/pb_input.py", line 3979, in main parse_datafiles(data_filenames, parsers, exp_crs) File "/Projects/software/perfbase/bin/pb_input.py", line 3537, in parse_datafiles action = pn.check_trigger(fname, l_idx) File "/Projects/software/perfbase/bin/pb_input.py", line 2334, in check_trigger if re.search(self.regexp): TypeError: search() takes at least 2 arguments (1 given) Patch attached... as usual, no warranties, but it works for me. -- Best Regards Patrick Ohly Senior Software Engineer Intel GmbH Software & Solutions Group Hermuelheimer Strasse 8a Phone: +49-2232-2090-30 50321 Bruehl Fax: +49-2232-2090-29 Germany Intel GmbH, Dornacher Strasse 1, 85622 Feldkirchen/Muenchen Germany Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer Registergericht: Muenchen HRB 47456 Ust.- IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt (BLZ 502 109 00) 600119052 [separator-regexp.patch] *** /Projects/software/perfbase/bin/pb_input.py.orig 2007-03-14 09:25:44.532834000 +0100 --- /Projects/software/perfbase/bin/pb_input.py 2007-03-14 09:29:27.921502000 +0100 *************** *** 2331,2337 **** if find(get_dataline(fname, idx), self.match) != -1: rval = "parse" else: ! if re.search(self.regexp): rval = "parse" if rval != "nothing": self.trigger_cnt += 1 --- 2331,2337 ---- if find(get_dataline(fname, idx), self.match) != -1: rval = "parse" else: ! if re.search(self.regexp, get_dataline(fname, idx)): rval = "parse" if rval != "nothing": self.trigger_cnt += 1 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: set_separator/regexpPatrick Ohly schrieb:
> Hi, > > it seems I have a tendency to try out new code paths ;-) The latest one > is: > > <set_separation> > <regexp>.*(?:foo|bar).*</regexp> > </set_separation> > > which leads to: > > Traceback (most recent call last): > File "/Projects/software/perfbase/bin/pb_input.py", line 4012, in ? > main() > File "/Projects/software/perfbase/bin/pb_input.py", line 3979, in main > parse_datafiles(data_filenames, parsers, exp_crs) > File "/Projects/software/perfbase/bin/pb_input.py", line 3537, in > parse_datafiles > action = pn.check_trigger(fname, l_idx) > File "/Projects/software/perfbase/bin/pb_input.py", line 2334, in > check_trigger > if re.search(self.regexp): > TypeError: search() takes at least 2 arguments (1 given) > > Patch attached... as usual, no warranties, but it works for me. Great, thanks. Yes, I thinnk I have never used set-separation with regexps... I will soon apply all your patches and test them with the test suite. Don't worry, they won't get lost. Joachim -- Joachim Worringen, Software Architect, Dolphin Interconnect Solutions phone ++49/(0)228/324 08 17 - http://www.dolphinics.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |