Tom Dossis wrote:
mats.nordgren wrote:
The IntId subscribers are fired on and IObjectRemovedEvent.

That's correct, however the (IWrite)Container __setitem__ method invokes
the ObjectAddedEvent for you when you add an object to the container.

Your code below looks like it's running zope directly, e.g. `zopectl
debug`.  In this case you need to explicitly set a/the current site
yourself.  Try insert the following first up...

  from import hooks

Correct. SItes are usually found during traversal. When doing stuff before any traversal is happening, you won't have a local site yet. So, using setSite() is appropriate, just remember to call setSite(None) afterwards for cleanup!

Zope3-users mailing list

Reply via email to