Sfoglia il codice sorgente

Get around Mako bug that doesn't support try/else

pull/24/head
Ben Kurtovic 12 anni fa
parent
commit
94d266e740
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. +2
    -3
      pages/settings.mako

+ 2
- 3
pages/settings.mako Vedi File

@@ -54,14 +54,13 @@
<td><b><tt>${cookie.key | h}</tt></b></td>
% try:
<% lines = dumps(loads(cookie.value), indent=4).splitlines() %>
% except ValueError:
<td><tt>${cookie.value | h}</tt></td>
% else:
<td>
% for line in lines:
<tt><div class="indentable">${line | h}</div></tt>
% endfor
</td>
% except ValueError:
<td><tt>${cookie.value | h}</tt></td>
% endtry
<td>
<form action="${environ['PATH_INFO']}" method="post">


Caricamento…
Annulla
Salva