summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_common.py')
-rwxr-xr-xbin/reproducible_common.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 01e5332f..ab9baf73 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -136,10 +136,12 @@ html_header = Template("""<!DOCTYPE html>
</head>
<body $padding>""")
-if os.environ['JOB_URL'] == '':
- JOB_FOOTER=''
-else:
+try:
JOB_URL = os.environ['JOB_URL']
+except KeyError
+ JOB_URL = ''
+ JOB_FOOTER = ''
+else:
JOB_NAME = os.path.basename(JOB_URL[:-1])
JOB_FOOTER = 'This page was built by the jenkins job <a href="'+JOB_URL+'">'
JOB_FOOTER += JOB_NAME+'</a> which is configured via this '