comparison sat/tools/common/template.py @ 2952:d8857e913309

tools (common/template): fixed theme parsing when there is no "/" in parenthesis
author Goffi <goffi@goffi.org>
date Sat, 25 May 2019 15:13:35 +0200
parents 8ca12f30f61f
children ab2696e34d29
comparison
equal deleted inserted replaced
2951:c8cd5c30fb2e 2952:d8857e913309
115 except IndexError: 115 except IndexError:
116 raise ValueError(u"incorrect site/theme in template") 116 raise ValueError(u"incorrect site/theme in template")
117 theme_data = template[1:theme_end] 117 theme_data = template[1:theme_end]
118 theme_splitted = theme_data.split(u'/') 118 theme_splitted = theme_data.split(u'/')
119 if len(theme_splitted) == 1: 119 if len(theme_splitted) == 1:
120 site, theme = u"", theme_splitted 120 site, theme = u"", theme_splitted[0]
121 elif len(theme_splitted) == 2: 121 elif len(theme_splitted) == 2:
122 site, theme = theme_splitted 122 site, theme = theme_splitted
123 else: 123 else:
124 raise ValueError(u"incorrect site/theme in template") 124 raise ValueError(u"incorrect site/theme in template")
125 template_path = template[theme_end+1:] 125 template_path = template[theme_end+1:]