From: Buchan M. <bg...@st...> - 2011-01-24 15:12:42
|
On Tuesday, 21 December 2010 09:59:05 Nelis, Wim wrote: > Hello, > > the syntax check of the WORST transform failed, while the syntax looks > good: Phy2StatusE : WORST : {endptPhy2Speed},{endptPhy2Duplex} > The patch below changes the syntax check to become identical to the syntax > check of a BEST transform. Once applied the line above will not result in > an error message any more. However, it is not clear to me what is wrong > with the original RE to check the syntax. I think the problem is that both OIDs may be attempted to be matched by by ^\s*\{\s*\S+?\s*\}, whereas only the first one will match that. Since no templates in svn use WORST, I would appreciate if you can confirm that svn r206 or later works correctly. > > Index: modules/dm_templates.pm > =================================================================== > --- modules/dm_templates.pm (revision 10) > +++ modules/dm_templates.pm (revision 11) > @@ -653,7 +653,7 @@ > }; > > $func_type eq 'worst' and do { > - $temp =~ s/^\s*\{\s*\S+?\s*\}|\s*,\s*//g; > + $temp =~ s/\s*\{\s*\S+?\s*\}|\s*,\s*//g; > do_log("WORST transform uses only comma-delimited oids at " . > "$trans_file, line $l_num", 0) > and next LINE if $temp ne ''; > > I didn't apply this patch, but edited and commited, but I think I got it right. Regards, Buchan |