From 14ee58c5f49ed11ed5c5b57bb708263246255990 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 17 Aug 2015 10:49:26 +0000 Subject: reproducible: notes: do not fail when not run on jenkins due to lack of the BUILD_URL evn variable --- bin/reproducible_notes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_notes.py b/bin/reproducible_notes.py index 15921b72..b6173598 100755 --- a/bin/reproducible_notes.py +++ b/bin/reproducible_notes.py @@ -50,8 +50,12 @@ def load_notes(): print_critical_message('Warning: This query produces no results: ' + query + '\nThis means there is no tested ' + 'package with the name ' + pkg) - irc_msg('There is problem with the note for ' + pkg + - ' - please have a look at ' + os.environ['BUILD_URL']) + try: + irc_msg('There is problem with the note for ' + pkg + + ' - please have a look at ' + os.environ['BUILD_URL']) + except KeyError: + log.error('There is a problem with the note for %s - please ' + 'check.', pkg) else: notes[pkg] = [] for suite in result: -- cgit v1.2.3-54-g00ecf