Commit bb4dc099 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Upon reset, only remove ModuleType objects from the erp5.component.XXX.

parent 347b899b
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
# #
############################################################################## ##############################################################################
from types import ModuleType
import transaction import transaction
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
...@@ -92,8 +94,8 @@ class ComponentTool(BaseTool): ...@@ -92,8 +94,8 @@ class ComponentTool(BaseTool):
except AttributeError: except AttributeError:
pass pass
else: else:
for name in module.__dict__.keys(): for name, klass in module.__dict__.items():
if name[0] != '_': if name[0] != '_' and isinstance(klass, ModuleType):
LOG("ERP5Type.Tool.ComponentTool", INFO, LOG("ERP5Type.Tool.ComponentTool", INFO,
"Resetting erp5.component.%s.%s" % (module_name, name)) "Resetting erp5.component.%s.%s" % (module_name, name))
......
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