hobo: only import skeleton site if template_name is defined (#14806)

This commit is contained in:
Frédéric Péters 2017-01-30 09:47:27 +01:00
parent 5b11187e73
commit b47650e784
1 changed files with 5 additions and 4 deletions

View File

@ -107,10 +107,11 @@ class CmdCheckHobos(Command):
os.mkdir(pub.app_dir)
pub.initialize_app_dir()
skeleton_filepath = os.path.join(global_app_dir, 'skeletons',
service.get('template_name'))
if os.path.exists(skeleton_filepath):
pub.import_zip(file(skeleton_filepath))
if service.get('template_name'):
skeleton_filepath = os.path.join(global_app_dir, 'skeletons',
service.get('template_name'))
if os.path.exists(skeleton_filepath):
pub.import_zip(file(skeleton_filepath))
new_site = True
else:
print 'updating instance in', pub.app_dir