[Qa-jenkins-scm] [jenkins.debian.net] 01/02: common.py: don't fail if JOB_URL is not defined in the env
Holger Levsen
holger at moszumanska.debian.org
Fri Jan 8 13:45:42 UTC 2016
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 861760d994b1eac4144a3734ca2e362e3f3a483d
Author: Mattia Rizzolo <mattia at debian.org>
Date: Fri Jan 8 13:36:37 2016 +0000
common.py: don't fail if JOB_URL is not defined in the env
---
bin/reproducible_common.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 01e5332..ab9baf7 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 '
--
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