summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp.py')
-rw-r--r--webapp.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/webapp.py b/webapp.py
index 128b816..f45c28e 100644
--- a/webapp.py
+++ b/webapp.py
@@ -30,12 +30,8 @@ src_template = """<!DOCTYPE html>
<th>state</th>
<th>architectures</th>
</tr>
- {%- set bootstrapdn = namespace(show=False) -%}
{%- set okarchs = depresult.pop(None, None) -%}
{%- for reason, archs in depresult.items()|sort -%}
- {%- if not reason.startswith("skew ") -%}
- {%- set bootstrapdn.show = True -%}
- {%- endif -%}
<tr>
<td>{{ reason|e }}</td>
<td>{{ archs|arch_format }}</td>
@@ -50,7 +46,7 @@ src_template = """<!DOCTYPE html>
</table>
<h5>See also</h5>
<ul>
- {%- if bootstrapdn.show -%}
+ {%- if show_bootstrapdn -%}
<li>
<a href="https://bootstrap.debian.net/cross_all/{{ sourcepackage|e }}.html">bootstrap.debian.net</a>
</li>
@@ -146,6 +142,9 @@ def show_source(source):
SELECT version, architecture, success, starttime, filename
FROM builds WHERE source = :source;""")
context["builds"] = list(conn.execute(query, source=source))
+ context["show_bootstrapdn"] = \
+ any(reason and not reason.startswith("skew ")
+ for reason in context["depresult"].keys())
return flask.render_template_string(src_template, **context)
@app.route("/build/<path:filename>")