don't fail on error in version templates json (#4346)
This commit is contained in:
parent
884cf78324
commit
c02496e59e
|
@ -55,7 +55,10 @@ def file_source(context):
|
|||
except AttributeError:
|
||||
version_templates = '/ foo'
|
||||
if os.path.exists(version_templates):
|
||||
templates = json.load(file(version_templates))
|
||||
try:
|
||||
templates = json.load(file(version_templates))
|
||||
except:
|
||||
templates = []
|
||||
for entry in templates:
|
||||
if entry.get('portal_types') and context.portal_type not in entry.get('portal_types'):
|
||||
continue
|
||||
|
|
Reference in New Issue