From d7d7fc111ce72c0c0198d770a1bc5eb27b5033d7 Mon Sep 17 00:00:00 2001 From: Sandro Tosi Date: Fri, 1 Jan 2016 15:11:07 +0000 Subject: [PATCH] print the "If you want to provide additional information" text only if an email is specified in sysinfo, this prevents a crash if we are sending reports to a non-debbugs instance; Closes: #789332 --- debian/changelog | 5 ++++- reportbug/submit.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 61fdcde..003c856 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,9 @@ reportbug (6.6.6) UNRELEASED; urgency=medium Closes: #546914 - dont escape a single dot line surrounded by newlines (the End-Of-Message in SMTP), it is done by sendmail() automatically; Closes: #808742 + - print the "If you want to provide additional information" text only if an + email is specified in sysinfo, this prevents a crash if we are sending + reports to a non-debbugs instance; Closes: #789332 * debian/control - add dep on 'file' for python-reportbug; Closes: #803764 * reportbug/ui/text_ui.py @@ -34,7 +37,7 @@ reportbug (6.6.6) UNRELEASED; urgency=medium * reportbug/urlutils.py - remove handling of X11BROWSER and CONSOLEBROWSER, obsolete - -- Sandro Tosi Fri, 01 Jan 2016 14:52:18 +0000 + -- Sandro Tosi Fri, 01 Jan 2016 15:10:09 +0000 reportbug (6.6.5) unstable; urgency=medium diff --git a/reportbug/submit.py b/reportbug/submit.py index 253fa50..16ddd94 100644 --- a/reportbug/submit.py +++ b/reportbug/submit.py @@ -507,7 +507,7 @@ def send_report(body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr, for address in cclist: ewrite(' %s\n', decode_email_header(address)) - if not (exinfo or kudos) and rtype == 'debbugs' and sysinfo and not failed \ + if not (exinfo or kudos) and rtype == 'debbugs' and sysinfo and 'email' in sysinfo and not failed \ and mailing: ewrite('\n') ui.final_message(