Modify ↓
Opened 11 years ago
Closed 11 years ago
#11638 closed defect (fixed)
Breaking Python 2.4 compatibility of 2.2.2
Reported by: | Jun Omae | Owned by: | Olemis Lang |
---|---|---|---|
Priority: | normal | Component: | ThemeEnginePlugin |
Severity: | normal | Keywords: | py24 |
Cc: | Trac Release: | 0.12 |
Description
I got the following error with Python 2.4.
TemplateSyntaxError: invalid syntax (/home/jun66j5/.python-eggs/TracThemeEngine-2.2.2dev-py2.4.egg-tmp/themeengine/templates/admin_theme_advanced.html, line 37)
TemplateSyntaxError: invalid syntax (/home/jun66j5/.python-eggs/TracThemeEngine-2.2.2dev-py2.4.egg-tmp/themeengine/templates/admin_theme.html, line 50)
The template files use expr if cond else expr
syntax introduced in Python 2.5.
-
themeengine/templates/admin_theme.html
47 47 <div id="themebuttons"> 48 48 <img src="${href.chrome('themeengine', 'img', 'next.gif')}" border="0" id="nextbutton" /> 49 49 <img src="${href.chrome('themeengine', 'img', 'prev.gif')}" border="0" id="prevbutton" /> 50 <input type="submit" value="${dgettext('themeengine', 'Use this theme')}" class="${ 'btn' if bhdb else None}"/>50 <input type="submit" value="${dgettext('themeengine', 'Use this theme')}" class="${(None, 'btn')[bool(bhdb)]}" /> 51 51 </div> 52 52 </form> 53 53 -
themeengine/templates/admin_theme_advanced.html
34 34 <textarea name="css" rows="40" cols="80">$css</textarea> 35 35 </fieldset> 36 36 <div class="buttons"> 37 <input type="submit" value="${dgettext('themeengine', 'Submit')}" class="${ 'btn' if bhdb else None}" />37 <input type="submit" value="${dgettext('themeengine', 'Submit')}" class="${(None, 'btn')[bool(bhdb)]}" /> 38 38 </div> 39 39 </form> 40 40 </body>
Attachments (0)
Note: See
TracTickets for help on using
tickets.
In 13788: