From 78e05eb8f88b7bb320c02cf7355873090d036154 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 20 Jan 2015 00:13:39 +0100 Subject: reproducible: common: handle the case where print_critical_message has to print something different than a simple string --- bin/reproducible_common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') 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): -- cgit v1.2.3-70-g09d2