[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible: html_indexes: print the page sections of the scheduled page even if there is nothing to show

Holger Levsen holger at moszumanska.debian.org
Thu Mar 5 14:43:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 3bd0650d1480e148d22fc9ab119124ed3f193b0f
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Thu Mar 5 15:40:13 2015 +0100

    reproducible: html_indexes: print the page sections of the scheduled page even if there is nothing to show
---
 bin/reproducible_html_indexes.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index e1b8394..c474c28 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -293,15 +293,15 @@ def build_leading_text_section(section, rows, suite, arch):
     return html
 
 
-def build_page_section(section, suite, arch):
+def build_page_section(page, section, suite, arch):
     try:
         rows = query_db(queries[section['query']].format(suite=suite, arch=arch))
     except:
         print_critical_message('A query failed: ' + queries[section['query']])
         raise
     html = ''
-    if not rows:     # there are no package in this set
-        return html  # do not output anything on the page.
+    if not rows and page != 'scheduled':  # there are no package in this set
+        return html                       # do not output anything on the page.
     html += build_leading_text_section(section, rows, suite, arch)
     html += '<p>\n' + tab + '<code>\n'
     for row in rows:
@@ -333,9 +333,9 @@ def build_page(page, suite=None, arch=None):
         if not suite:  # global page
             for lsuite in SUITES:
                 for larch in ARCHES:
-                    html += build_page_section(section, lsuite, larch)
+                    html += build_page_section(page, section, lsuite, larch)
         else:
-            html += build_page_section(section, suite, arch)
+            html += build_page_section(page, section, suite, arch)
     try:
         title = pages[page]['title']
     except KeyError:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list