Hi, I made a buggy access rule at the root of ZODB that makes the ZMI unreachable (error in Python script) I want to delete this accessrule so I stopped Zope and... % cd $ZOPEROOT/lib/python % $ZOPEROOT/bin/python
import Zope app = Zope.app() dir(app) [..., 'accessrule',...] app.manage_delObjects(['accessrule']) dir(app) [...] # no more "accessrule" ^D
but 'accessrule' is STILL HERE ! When I do again : % $ZOPEROOT/bin/python
import Zope app = Zope.app() dir(app) [..., 'accessrule',...] # Thought it was deleted !!!
Did I miss something ? Is there a "commit" like to do before quitting python? Thanks in advance --Gilles
On Tue, 2 Oct 2001, Gilles Lenfant wrote:
Hi,
I made a buggy access rule at the root of ZODB that makes the ZMI unreachable (error in Python script) I want to delete this accessrule so I stopped Zope and...
% cd $ZOPEROOT/lib/python % $ZOPEROOT/bin/python
import Zope app = Zope.app() dir(app) [..., 'accessrule',...] app.manage_delObjects(['accessrule']) dir(app) [...] # no more "accessrule" ^D
but 'accessrule' is STILL HERE ! When I do again :
% $ZOPEROOT/bin/python
import Zope app = Zope.app() dir(app) [..., 'accessrule',...] # Thought it was deleted !!!
Did I miss something ? Is there a "commit" like to do before quitting python?
Yep, it's called get_transaction().commit() setting SUPPRESS_ACCESSRULE in the start script will disable the access rules as well, BTW Stefan
Thanks Stefan, do you mean I should write
app.get_transaction().commit()
Cheers --Gilles
import Zope app = Zope.app() dir(app) [..., 'accessrule',...] # Thought it was deleted !!!
Did I miss something ? Is there a "commit" like to do before quitting python?
Yep, it's called get_transaction().commit()
setting SUPPRESS_ACCESSRULE in the start script will disable the access rules as well, BTW
Stefan
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Gilles Lenfant -
Stefan H. Holek