[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-71-g326685b

Sandro Tosi morph at debian.org
Fri Mar 12 09:27:41 UTC 2010


The following commit has been merged in the master branch:
commit 326685b606be3784c86e6de1e984370db99e3971
Author: Sandro Tosi <morph at debian.org>
Date:   Fri Mar 12 10:24:22 2010 +0100

    in case of SMTP error when submitting the report, ask to retry or else to save the report and exit; thanks to Stuart Young for the report; Closes: #293266

diff --git a/debian/changelog b/debian/changelog
index a77ad47..d07eb96 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,8 +48,12 @@ reportbug (4.10.3) UNRELEASED; urgency=low
     - update the tags list, including all those supported by BTS, not restricted
       to Release Team and meaningfull at report time; thanks to Ido Kanner and
       to martin f krafft for the reports; Closes: #286745, #498919, #524511
+  * reportbug/submit.py
+    - in case of SMTP error when submitting the report, ask to retry or else to
+      save the report and exit; thanks to Stuart Young for the report;
+      Closes: #293266
 
- -- Sandro Tosi <morph at debian.org>  Fri, 12 Mar 2010 00:04:36 +0100
+ -- Sandro Tosi <morph at debian.org>  Fri, 12 Mar 2010 10:23:07 +0100
 
 reportbug (4.10.2) unstable; urgency=low
 
diff --git a/reportbug/submit.py b/reportbug/submit.py
index e0aaea9..f6d5256 100644
--- a/reportbug/submit.py
+++ b/reportbug/submit.py
@@ -394,14 +394,19 @@ def send_report(body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
                     else:
                         tryagain = False
 
-                failed = True
-                ewrite('SMTP send failure: %s\n', x)
+                # In case of failure, ask to retry or to save & exit
+                if ui.yes_no('SMTP send failure: %s. Do you want to retry (or else save the report and exit)?' % x, 'Yes, please retry.',
+                         'No, save and exit.'):
+                    tryagain = True
+                    continue
+                else:
+                    failed = True
 
-                fh, msgname = TempFile(prefix=tfprefix, dir=draftpath)
-                fh.write(message)
-                fh.close()
+                    fh, msgname = TempFile(prefix=tfprefix, dir=draftpath)
+                    fh.write(message)
+                    fh.close()
 
-                ewrite('Wrote bug report to %s\n', msgname)
+                    ewrite('Wrote bug report to %s\n', msgname)
         # Handle when some recipients are refused.
         if refused:
             for (addr, err) in refused.iteritems():

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list