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

Sandro Tosi morph at debian.org
Sat Jan 2 01:17:35 UTC 2010


The following commit has been merged in the master branch:
commit cb04aa02d2840acab743b2f1b2ee11c3e0394181
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Jan 2 02:10:43 2010 +0100

    notify the user that editing the report with a MUA in the last menu will loose every attachements; thanks to Guido Trotter for the report and to those that follow it up; Closes: #211808

diff --git a/bin/reportbug b/bin/reportbug
index 2c323cc..5304107 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -274,8 +274,24 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
                 if not utils.mua_exists(utils.MUA[mailer]):
                     ewrite("Selected mail user agent cannot be found.\n")
                 else:
+                    # get the MUA
                     mailer = utils.MUA.get(mailer)
-                    if mailer:
+                    # in case there are attachments
+                    if attachments:
+                        # notify that they will be lost
+                        if ui.yes_no(
+                            'Editing the report will loose all the attachement: are you sure you want to continue?',
+                            'Yes, please',
+                            'No, thanks',
+                            True):
+                            # if ok, go into the MUA
+                            options.mua = mailer
+                            break
+                        # else, go back to the menu
+                        else:
+                            pass
+                    # no attach, we can go directly into the MUA
+                    else:
                         options.mua = mailer
                         break
             skip_editing = True
diff --git a/debian/changelog b/debian/changelog
index 2bc7abf..7c80ae3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,8 +24,12 @@ reportbug (4.10~WIP) UNRELEASED; urgency=low
   * man/{querybts.1, reportbug.1}
     - removed NOTE about Python's getopt: both tools are now using optparse
       module to retrieve CLI parameters
+  * bin/reportbug
+    - notify the user that editing the report with a MUA in the last menu will
+      loose every attachements; thanks to Guido Trotter for the report and to
+      those that follow it up; Closes: #211808
 
- -- Sandro Tosi <morph at debian.org>  Fri, 01 Jan 2010 20:36:10 +0100
+ -- Sandro Tosi <morph at debian.org>  Sat, 02 Jan 2010 02:08:53 +0100
 
 reportbug (4.9) unstable; urgency=low
 

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list