summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-02-08 14:48:43 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-08 14:48:43 +0100
commit9e0a2704b51b4b15995201e586cff4f0f99c7433 (patch)
tree6a041d566211c990c00449b026cc3f4c72e88312
parent2e734ebaa472046e7158316025b52b0ac4558eca (diff)
downloadjenkins.debian.net-9e0a2704b51b4b15995201e586cff4f0f99c7433.tar.xz
reproducible: and you must try and try... and really better except properly
-rwxr-xr-xbin/reproducible_common.py3
-rwxr-xr-xbin/reproducible_html_packages.py10
2 files changed, 9 insertions, 4 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index a1ff02aa..79db4f35 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -227,7 +227,6 @@ def start_udd_connection():
return conn
def query_udd(query):
- conn_udd = start_udd_connection()
cursor = conn_udd.cursor()
cursor.execute(query)
return cursor.fetchall()
@@ -344,6 +343,8 @@ def get_bugs():
# init the databases connections
conn_db = start_db_connection() # the local sqlite3 reproducible db
+try:
+ conn_udd = start_udd_connection()
# do the db querying
amount = int(query_db('SELECT count(name) FROM sources')[0][0])
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 242c44a9..ea38fc2f 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -133,8 +133,9 @@ def process_packages(packages, no_clean=False):
generate the /rb-pkg/package.html page
packages should be a list
"""
- bugs = get_bugs()
- log.debug(str(len(bugs)) + ' bugs found: ' + str(bugs))
+ try:
+ bugs = get_bugs()
+ log.debug(str(len(bugs)) + ' bugs found: ' + str(bugs))
total = len(packages)
log.info('Generating the pages of ' + str(total) + ' package(s)')
for pkg in sorted(packages):
@@ -144,7 +145,10 @@ def process_packages(packages, no_clean=False):
' built at ' + build_date)
links, default_view = gen_extra_links(pkg, version)
- bugs_links = gen_bugs_links(pkg, bugs)
+ try:
+ bugs_links = gen_bugs_links(pkg, bugs)
+ else
+ bugs_links = ""
status, icon = join_status_icon(status, pkg, version)
html = html_package_page.substitute(package=pkg,