From 6a3aa369d059238957b1fca2fab747014e0498f4 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 11 Feb 2008 14:44:17 +0000 Subject: [PATCH] Check PropertySheet extension before importing. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19240 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index ebadb3d803..ff9b1b2af2 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -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 -- 2.30.9