diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-01-20 00:13:39 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-15 17:37:45 +0100 |
commit | 78e05eb8f88b7bb320c02cf7355873090d036154 (patch) | |
tree | f965d5890930c42b016e3f973720c42bab1df669 /bin | |
parent | 30e92da657fa14d6822756fa59360db3882e8dea (diff) | |
download | jenkins.debian.net-78e05eb8f88b7bb320c02cf7355873090d036154.tar.xz |
reproducible: common: handle the case where print_critical_message has to print something different than a simple string
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index e7d15394..45779b05 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -176,8 +176,11 @@ url2html = re.compile(r'((mailto\:|((ht|f)tps?)\://|file\:///){1}\S+)') def print_critical_message(msg): print('\n\n\n') - for line in msg.splitlines(): - log.critical(line) + try: + for line in msg.splitlines(): + log.critical(line) + except AttributeError: + log.critical(msg) print('\n\n\n') def write_html_page(title, body, destfile, noheader=False, style_note=False, noendpage=False): |