[Zope] problem with manage_importObject
Jens Vagelpohl
jens at dataflake.org
Mon Mar 12 07:46:30 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> perhaps this is the problem...
> in fact /var/lib/zope2.9/instance/myinstance/var is empty after
> importObject operation using python script.
>
> but the commit has been introduced in zope 2.9?
The need to commit a transaction has been part of the ZODB since day 1.
> I use the same code in zope2.7 without problem.
> in a python script I use:
> zopeClient('http://localhost:9673/manage_importObject?
> file=app.zexp',myuser,mypassword)
>
> where zopeClient is:
> def zopeClient(url,username,passwd):
> f = Function(url)
> f.username = username
> f.password = passwd
> apply(f,(),{})
Maybe the behavior of the old Zope client stuff has changed. I
honestly don't know anyone who uses it. Nowadays I would always write
scripts that are invoked using "zopectl run", which means you need to
have a ZEO-enabled setup, if you don't have it already.
> How I can do "commit"?
import transaction
transaction.commit()
This doesn't work with the Zope client approach, which is basically
glorified URL-whacking...
jens
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF9T2WRAx5nvEhZLIRAgOaAJ9SL//QC6OYXXhv80OPT7gCU62/rQCfRzqL
6KIwxhWyr5nObUf2T5o+38g=
=VysF
-----END PGP SIGNATURE-----
More information about the Zope
mailing list