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())
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
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
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