Re: Killing Another Bug

2009-12-04 Thread Victor Subervi
On Fri, Dec 4, 2009 at 3:46 PM, Stephen Hansen wrote: > > On Fri, Dec 4, 2009 at 7:52 AM, Victor Subervi wrote: > >> except: >> > > >> except: >> pass >> > > If you want any hope of fixing the bug, remove both of these. Really -- do > not use bare excepts. > > In the first one, it lo

Re: Killing Another Bug

2009-12-04 Thread Stephen Hansen
On Fri, Dec 4, 2009 at 7:52 AM, Victor Subervi wrote: > except: > > except: > pass > If you want any hope of fixing the bug, remove both of these. Really -- do not use bare excepts. In the first one, it looks like you're expecting sometimes there to be an exception: that's okay.

Re: Killing Another Bug

2009-12-04 Thread Victor Subervi
On Fri, Dec 4, 2009 at 2:08 PM, Victor Subervi wrote: > On Fri, Dec 4, 2009 at 12:43 PM, MRAB wrote: > >> Victor Subervi wrote: >> >>> Hi; >>> I have this code: >>> >>> >> [snip] >> >> As you can see in the supplied comments, when I loop through for table >>> 'prescriptions', it only prints out

Re: Killing Another Bug

2009-12-04 Thread Victor Subervi
On Fri, Dec 4, 2009 at 12:43 PM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> I have this code: >> >> > [snip] > > As you can see in the supplied comments, when I loop through for table >> 'prescriptions', it only prints out the first element of each variable. When >> I loop through for tabl

Re: Killing Another Bug

2009-12-04 Thread MRAB
Victor Subervi wrote: Hi; I have this code: [snip] As you can see in the supplied comments, when I loop through for table 'prescriptions', it only prints out the first element of each variable. When I loop through for table 'products', it prints out all of them! Why? If you're serious a

Killing Another Bug

2009-12-04 Thread Victor Subervi
Hi; I have this code: for table in tables: if table == 'products': optionsCode = optionsCodeProducts fromForm = prodsFromForm try: fn = getattr(options, table) fromForm = form.getfirst('%s-options' % table) fromForm = string.split(fromForm[2:-2], "', '")