• Sebastien Robin's avatar
    ERP5Type.dynamic: show up failures in __getattribute__ of lazy_class · d032411c
    Sebastien Robin authored
    If for some reasons loadClass was not working, it was failing totally
    silently without any log. If there is any unexpected error in loadClass,
    this ended up for example having some tests failing with :
    RuntimeError: Malformed property definition <persistent broken
    erp5.portal_type.Acquired Property instance '\x00\x00\x00\x00\x00\x00\x12\xb5'>
    on /erp5/portal_property_sheets/SimpleItem
    While only this was displayed in logs :
    ERP5Type/dynamic/lazy_class.py", line 350, in loadClass
        class_definition = generatePortalTypeClass(site, portal_type)
    AttributeError: __of__
    Which was totally unrelated to the real problem.
    So a silent initial error was the source of later unrelated errors, making
    it very difficult to find the initial source of problem.
    So make sure we have logs as soon as we are not able to load a class.
Last commit
Last update
__init__.py Loading commit data...
accessor_holder.py Loading commit data...
component_package.py Loading commit data...
dynamic_module.py Loading commit data...
lazy_class.py Loading commit data...
persistent_migration.py Loading commit data...
portal_type_class.py Loading commit data...