[ZCM] [ZC] 1705/ 1 Request "CopySource._postCopy is never called"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed Feb 16 07:51:38 EST 2005


Issue #1705 Update (Request) "CopySource._postCopy is never called"
 Status Accepted, Zope/bug+solution medium
To followup, visit:
  http://zope.org/Collectors/Zope/1705

==============================================================
= Request - Entry #1 by Tiran on Feb 16, 2005 7:51 am

 Status: Pending => Accepted

 Supporters added: Tiran


Uploaded:  "copyfix.patch"
 - http://zope.org/Collectors/Zope/1705/copyfix.patch/view
OFS.CopySupport.CopySource defines a _postCopy() method but it's never called.

def _postCopy(self, container, op=0):
    # Called after the copy is finished to accomodate special cases.
    # The op var is 0 for a copy, 1 for a move.
    pass

The patch is fixing the bug by adding the call just after the object is set by _setObject(). Also I've changed the _getOb() method to work like the one from ObjectManager. CopyContainer._getObj looked like it may return the object w/o a context. The version from ObjectManager was more pythonic, too.

If everybody is fine with my fix I will apply it to cvs and svn.
==============================================================



More information about the Zope-Collector-Monitor mailing list