[Zope-dev] dtml-in batching
Brad Clements
bkc@murkworks.com
Mon, 22 Jan 2001 16:06:02 -0500
This was submitted to the collect quite a while ago as a bug..
Also I submitted a patch about 2 months ago for this, about the same
patch as yours.
On 22 Jan 2001, at 12:03, richard@bizarsoftware.com.au wrote:
From: richard@bizarsoftware.com.au
Date sent: Mon, 22 Jan 2001 12:03:14 +1100
To: "zope-dev@zope.org" <zope-dev@zope.org>
Subject: Re: [Zope-dev] dtml-in batching
> richard@bizarsoftware.com.au wrote:
> >
> > The dtml-in batching mechanisms are quite difficult to debug - the DTML
> > documentation I have has examples which break it and there's no
> > indication of why. It turns out the DT_In renderwb() code gobbles all
> > exceptions from the rendering of the previous and next blocks. I've
> > hacked my code so that there's no try/except clause any more. I'm not
> > sure what exception it's trying to catch, but could it perhaps be made a
> > little more picky?
>
> And here's a diff - I'm pretty sure this was the intended behaviour...
>
>
> *** /tmp/DT_In.py.orig Mon Jan 22 12:00:53 2001
> --- DT_In.py Mon Jan 22 12:00:58 2001
> ***************
> *** 561,566 ****
> --- 561,570 ----
> # there are more items, without actually
> # computing a length:
> sequence[end]
> + except IndexError:
> + if self.elses: result=render(self.elses, md)
> + else: result=''
> + else:
> pstart,pend,psize=opt(end+1-overlap,0,
> sz,orphan,sequence)
> kw['next-sequence']=1
> ***************
> *** 568,576 ****
> kw['next-sequence-end-index']=pend-1
> kw['next-sequence-size']=pend+1-pstart
> result=render(section,md)
> - except:
> - if self.elses: result=render(self.elses, md)
> - else: result=''
> else:
> result = []
> append=result.append
> --- 572,577 ----
>
>
> --
> Richard Jones
> richard@bizarsoftware.com.au
> Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
>
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com AOL-IM: BKClements