[Erp5-report] r43937 arnaud.fontaine - /erp5/trunk/products/ERP5Type/dynamic/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 3 14:03:23 CET 2011


Author: arnaud.fontaine
Date: Thu Mar  3 14:03:22 2011
New Revision: 43937

URL: http://svn.erp5.org?rev=43937&view=rev
Log:
Fix SyntaxError on python 2.4

Modified:
    erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py

Modified: erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py?rev=43937&r1=43936&r2=43937&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/portal_type_class.py [utf8] Thu Mar  3 14:03:22 2011
@@ -382,23 +382,24 @@ def synchronizeDynamicModules(context, f
       _bootstrapped.add(portal.id)
 
     LOG("ERP5Type.dynamic", 0, "Resetting dynamic classes")
-    for class_name, klass in inspect.getmembers(erp5.portal_type,
-                                                inspect.isclass):
-      klass.restoreGhostState()
-
-    # Clear accessor holders of ZODB Property Sheets and Portal Types
-    erp5.accessor_holder.clear()
-    erp5.accessor_holder.property_sheet.clear()
-
-    for name in erp5.accessor_holder.portal_type.__dict__.keys():
-      if name[0] != '_':
-        delattr(erp5.accessor_holder.portal_type, name)
-
-  except Exception:
-    # Allow easier debugging when the code is wrong as this exception
-    # is catched later and re-raised as a BadRequest
-    import traceback; traceback.print_exc()
-    raise
+    try:
+      for class_name, klass in inspect.getmembers(erp5.portal_type,
+                                                  inspect.isclass):
+        klass.restoreGhostState()
+
+      # Clear accessor holders of ZODB Property Sheets and Portal Types
+      erp5.accessor_holder.clear()
+      erp5.accessor_holder.property_sheet.clear()
+
+      for name in erp5.accessor_holder.portal_type.__dict__.keys():
+        if name[0] != '_':
+          delattr(erp5.accessor_holder.portal_type, name)
+
+    except Exception:
+      # Allow easier debugging when the code is wrong as this
+      # exception is catched later and re-raised as a BadRequest
+      import traceback; traceback.print_exc()
+      raise
 
   finally:
     Base.aq_method_lock.release()



More information about the Erp5-report mailing list