Commit 226a4204 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERPSite: bootstrap() was not raising any error if the file could not be found in bt directory.

parent a3c0e2f6
...@@ -2037,7 +2037,9 @@ class ERP5Generator(PortalGenerator): ...@@ -2037,7 +2037,9 @@ class ERP5Generator(PortalGenerator):
traverse = context.unrestrictedTraverse traverse = context.unrestrictedTraverse
top = os.path.join(bt_path, item_name, context.id) top = os.path.join(bt_path, item_name, context.id)
prefix_len = len(os.path.join(top, '')) prefix_len = len(os.path.join(top, ''))
for root, dirs, files in os.walk(top): def onerror(error):
raise error
for root, dirs, files in os.walk(top, onerror=onerror):
container_path = root[prefix_len:] container_path = root[prefix_len:]
container_obj = traverse(container_path) container_obj = traverse(container_path)
load = container_obj._importObjectFromFile load = container_obj._importObjectFromFile
......
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