hobo_deploy: add support for themes.json switch to dictionary (#34095)

This commit is contained in:
Frédéric Péters 2019-06-18 09:08:06 +02:00
parent ccce3fba1e
commit b35f425223
1 changed files with 3 additions and 1 deletions

View File

@ -170,7 +170,9 @@ class CmdCheckHobos(Command):
os.path.join(self.THEMES_DIRECTORY, theme_module, 'themes.json')))
except IOError:
continue
for theme_data in themes_json:
if not isinstance(themes_json, dict): # compat
themes_json = {'themes': themes_json}
for theme_data in themes_json.get('themes'):
if theme_data.get('id') == theme_id:
if not 'module' in theme_data:
theme_data['module'] = theme_module