do not fail on missing zopehome
This commit is contained in:
parent
afa833e22c
commit
f683c8eb11
|
@ -49,8 +49,11 @@ def file_source(context):
|
|||
items.append(('previous', _('Previous Version')))
|
||||
|
||||
config = getConfiguration()
|
||||
version_templates = os.path.join(config.zopehome, 'etc',
|
||||
'version_templates', 'list.json')
|
||||
try:
|
||||
version_templates = os.path.join(config.zopehome, 'etc',
|
||||
'version_templates', 'list.json')
|
||||
except AttributeError:
|
||||
version_templates = '/ foo'
|
||||
if os.path.exists(version_templates):
|
||||
templates = json.load(file(version_templates))
|
||||
for entry in templates:
|
||||
|
|
Reference in New Issue