[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/container/browser/contents.py do not try to catch DuplicateIDError during adaption; that is the wrong time

Fred L. Drake, Jr. fdrake at gmail.com
Tue Jul 19 17:51:23 EDT 2005


Log message for revision 37342:
  do not try to catch DuplicateIDError during adaption; that is the wrong time
  to expect that error
  

Changed:
  U   Zope3/trunk/src/zope/app/container/browser/contents.py

-=-
Modified: Zope3/trunk/src/zope/app/container/browser/contents.py
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/contents.py	2005-07-19 19:01:44 UTC (rev 37341)
+++ Zope3/trunk/src/zope/app/container/browser/contents.py	2005-07-19 21:50:53 UTC (rev 37342)
@@ -375,15 +375,15 @@
                 pass
             else:
                 if item['action'] == 'cut':
+                    mover = IObjectMover(obj)
                     try:
-                        mover = IObjectMover(obj)
                         mover.moveTo(target)
                         moved = True
                     except DuplicateIDError:
                         duplicated_id = True
                 elif item['action'] == 'copy':
+                    copier = IObjectCopier(obj)
                     try:
-                        copier = IObjectCopier(obj)
                         copier.copyTo(target)
                     except DuplicateIDError:
                         duplicated_id = True



More information about the Zope3-Checkins mailing list