[zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.29

Sidnei da Silva sidnei at x3ng.com.br
Mon Jun 2 07:23:06 EDT 2003


Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions
In directory cvs.zope.org:/tmp/cvs-serv22596/Extensions

Modified Files:
	NZOMigrate.py 
Log Message:
Avoid clashes with method names

=== Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.28 => 1.29 ===
         dest = self._dest
         ignore = self._ignore_path
         source_id = source.getId()
-        if not hasattr(aq_base(dest), 'meta_type') or \
-               not hasattr(aq_base(dest), 'objectIds'):
-            # maybe-not-object. eg: we acquired the 'view' method
-            self.log('Destination is invalid. %r \n' % dest)
-            return 'Ok.\n'
         if hasattr(source, 'objectIds') and \
                hasattr(source, 'getPhysicalPath'):
             path = source.getPhysicalPath()
@@ -1199,6 +1194,11 @@
                     new_objs = (new_objs, )
 
                 for new_obj in new_objs:
+                    if not hasattr(aq_base(new_obj), 'meta_type'):
+                        # maybe-not-object. eg: we acquired the 'view' method
+                        self.log('New object is invalid. Probably acquired by mistake. %r.\n' % new_obj)
+                        continue
+                    
                     if new_obj is None:
                         self.log('Invalid object found when migrating: %s.\n' % obj_url)
                         continue





More information about the zopeorg-checkins mailing list