Projet

Général

Profil

0001-theme-add-support-for-themes.json-switch-to-dictiona.patch

Frédéric Péters, 16 juin 2019 20:22

Télécharger (992 octets)

Voir les différences:

Subject: [PATCH] theme: add support for themes.json switch to dictionary
 (#34024)

 hobo/theme/utils.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
hobo/theme/utils.py
31 31
                'themes.json')
32 32
        if not os.path.exists(filename):
33 33
            continue
34
        for theme in json.load(open(filename)):
34
        themes_data = json.load(open(filename))
35
        if not isinstance(themes_data, dict):
36
            themes_data = {'themes': themes_data}
37
        for theme in themes_data['themes']:
35 38
            if not 'module' in theme:
36 39
                theme['module'] = dirname
37 40
            themes.append(theme)
38
-