Browse Source

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

pull/24/head
Ben Kurtovic 12 years ago
parent
commit
94d266e740
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      pages/settings.mako

+ 2
- 3
pages/settings.mako View File

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


Loading…
Cancel
Save