summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_notes.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-08-17 10:42:03 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-08-17 10:48:46 +0000
commitf5b51adf4fe89a443ef6f3c49e05a3e75be60722 (patch)
tree99bf8d462ee31a6471b6688a487c7487e5618a61 /bin/reproducible_notes.py
parent15efd34ed215bbb6cdaafa77fbc5e9922b79fc3e (diff)
downloadjenkins.debian.net-f5b51adf4fe89a443ef6f3c49e05a3e75be60722.tar.xz
reproducible: notes: do not fail the job when the version is missing
Diffstat (limited to 'bin/reproducible_notes.py')
-rwxr-xr-xbin/reproducible_notes.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/reproducible_notes.py b/bin/reproducible_notes.py
index 872cf201..15921b72 100755
--- a/bin/reproducible_notes.py
+++ b/bin/reproducible_notes.py
@@ -40,7 +40,6 @@ def load_notes():
assert 'version' in original[pkg]
except AssertionError:
print_critical_message(pkg + ' did not include a version')
- raise
query = 'SELECT s.id, s.version, s.suite ' + \
'FROM results AS r JOIN sources AS s ON r.package_id=s.id' + \
' WHERE s.name="{pkg}" AND r.status != ""' + \
@@ -58,11 +57,17 @@ def load_notes():
for suite in result:
pkg_details = {}
# https://image-store.slidesharecdn.com/c2c44a06-5e28-4296-8d87-419529750f6b-original.jpeg
- if version_compare(str(original[pkg]['version']),
- str(suite[1])) > 0:
- continue
+ try:
+ if version_compare(str(original[pkg]['version']),
+ str(suite[1])) > 0:
+ continue
+ except KeyError:
+ pass
pkg_details['suite'] = suite[2]
- pkg_details['version'] = original[pkg]['version']
+ try:
+ pkg_details['version'] = original[pkg]['version']
+ except KeyError:
+ pkg_details['version'] = ''
pkg_details['comments'] = original[pkg]['comments'] if \
'comments' in original[pkg] else None
pkg_details['bugs'] = original[pkg]['bugs'] if \