Commit 676a41a3 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Fix SyntaxError on python 2.4

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43937 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 102c4d4d
...@@ -382,23 +382,24 @@ def synchronizeDynamicModules(context, force=False): ...@@ -382,23 +382,24 @@ def synchronizeDynamicModules(context, force=False):
_bootstrapped.add(portal.id) _bootstrapped.add(portal.id)
LOG("ERP5Type.dynamic", 0, "Resetting dynamic classes") LOG("ERP5Type.dynamic", 0, "Resetting dynamic classes")
for class_name, klass in inspect.getmembers(erp5.portal_type, try:
inspect.isclass): for class_name, klass in inspect.getmembers(erp5.portal_type,
klass.restoreGhostState() inspect.isclass):
klass.restoreGhostState()
# Clear accessor holders of ZODB Property Sheets and Portal Types
erp5.accessor_holder.clear() # Clear accessor holders of ZODB Property Sheets and Portal Types
erp5.accessor_holder.property_sheet.clear() erp5.accessor_holder.clear()
erp5.accessor_holder.property_sheet.clear()
for name in erp5.accessor_holder.portal_type.__dict__.keys():
if name[0] != '_': for name in erp5.accessor_holder.portal_type.__dict__.keys():
delattr(erp5.accessor_holder.portal_type, name) if name[0] != '_':
delattr(erp5.accessor_holder.portal_type, name)
except Exception:
# Allow easier debugging when the code is wrong as this exception except Exception:
# is catched later and re-raised as a BadRequest # Allow easier debugging when the code is wrong as this
import traceback; traceback.print_exc() # exception is catched later and re-raised as a BadRequest
raise import traceback; traceback.print_exc()
raise
finally: finally:
Base.aq_method_lock.release() Base.aq_method_lock.release()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment