[ZCM] [ZC] 1705/ 2 Resolve "CopySource._postCopy is never called"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Feb 18 09:11:30 EST 2005


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

==============================================================
= Resolve - Entry #2 by Tiran on Feb 18, 2005 9:11 am

 Status: Accepted => Resolved

Fixed in cvs 2.7 and svn trunk
________________________________________
= 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