summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez Piedehierro <palvarez89@gmail.com>2017-07-08 00:26:42 +0100
committerPedro Alvarez Piedehierro <palvarez89@gmail.com>2017-07-08 03:23:15 +0100
commit5bcb3e71099b283a699c6c45eb2767579f5f791a (patch)
treee1f247e812fa1f879eb6b8af269597f2805df957
parent1e10d0d1fe400063ea1b3adbe90b83fb9f7fcf69 (diff)
downloadlorry-controller-5bcb3e71099b283a699c6c45eb2767579f5f791a.tar.gz
status: send 'publish-failures' option to template
-rw-r--r--lorrycontroller/status.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lorrycontroller/status.py b/lorrycontroller/status.py
index 40bf964..a432690 100644
--- a/lorrycontroller/status.py
+++ b/lorrycontroller/status.py
@@ -46,9 +46,11 @@ class StatusRenderer(object):
def render_status_as_html(self, template, status):
return bottle.template(template, **status)
- def write_status_as_html(self, template, status, filename):
+ def write_status_as_html(self, template, status, filename,
+ publish_failures):
modified_status = dict(status)
modified_status['links'] = False
+ modified_status['publish_failures'] = publish_failures
html = self.render_status_as_html(template, modified_status)
# We write the file first to a temporary file and then
@@ -167,7 +169,8 @@ class Status(lorrycontroller.LorryControllerRoute):
renderer.write_status_as_html(
self._templates['status'],
status,
- self.app_settings['status-html'])
+ self.app_settings['status-html'],
+ self.app_settings['publish-failures'])
return status
@@ -185,6 +188,7 @@ class StatusHTML(lorrycontroller.LorryControllerRoute):
renderer.write_status_as_html(
self._templates['status'],
status,
- self.app_settings['status-html'])
+ self.app_settings['status-html'],
+ self.app_settings['publish-failures'])
return renderer.render_status_as_html(
self._templates['status'], status)