Commit 6a3aa369 authored by Vincent Pelletier's avatar Vincent Pelletier

Check PropertySheet extension before importing.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19240 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f0572079
......@@ -2801,6 +2801,9 @@ class DocumentTemplateItem(BaseTemplateItem):
bta.addObject(obj=obj, name=path, path=None, ext='.py')
def _importFile(self, file_name, file):
if not file_name.endswith('.py'):
LOG('Business Template', 0, 'Skipping file "%s"' % (file_name, ))
return
text = file.read()
self._objects[file_name[:-3]]=text
......
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