Re: [Zope3-Users] zopectl debug and deleting objects

2007-12-13 Thread Justin Fletcher
On Thu, 2007-12-13 at 07:06 -0500, Stephan Richter wrote: > On Thursday 13 December 2007, Justin Fletcher wrote: > > for i in root['mysite'].keys(): > > del(root['mysite'][i]) > > "keys()" produces an iterator that assumes the data structure is not changed; > Use list(root['mysite'].keys())

Re: [Zope3-Users] zopectl debug and deleting objects

2007-12-13 Thread Stephan Richter
On Thursday 13 December 2007, Justin Fletcher wrote: > for i in root['mysite'].keys(): >      del(root['mysite'][i]) "keys()" produces an iterator that assumes the data structure is not changed; Use list(root['mysite'].keys()) instead. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry

Re: [Zope3-Users] zopectl debug and deleting objects

2007-12-13 Thread Christophe Combelles
Maybe import transaction transaction.commit() will help? Christophe Justin Fletcher a écrit : Hello all, I am using 'zopectl debug' to run a script that imports data into the ZODB. This part is working fine. However, while testing this import script, I like to delete all the objects I have c

[Zope3-Users] zopectl debug and deleting objects

2007-12-13 Thread Justin Fletcher
Hello all, I am using 'zopectl debug' to run a script that imports data into the ZODB. This part is working fine. However, while testing this import script, I like to delete all the objects I have created so I can test the script again. I have been deleting the objects like this: for i in root