[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.5-6-g1b3960d

Sandro Tosi morph at debian.org
Sat Jul 11 07:20:01 UTC 2009


The following commit has been merged in the master branch:
commit 1b3960dff0cad0cdd12d733deb2f937606d23a0a
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Jul 11 09:19:27 2009 +0200

    allow ENTER to exit from file detaching menu (and enforced file checking); thanks to Rodrigo Campos for report and (partial) patch; Closes: 535789

diff --git a/bin/reportbug b/bin/reportbug
index 5c31646..ff48d77 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -246,13 +246,17 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
             if not attachments:
                 ewrite('No attachment file to detached.\n')
             else:
-                detachprompt = 'Choose an attachment file to detach:'
+                detachprompt = 'Choose an attachment file to detach (an empty line will exit): '
                 myattachments = []
                 myattachments = [(x, '') for x in attachments]
                 filetodetach = ui.menu(detachprompt, myattachments,
                     'Select the file:', default='', empty_ok=True)
-                attachments.remove(filetodetach)
-                ewrite('Attachment file successfully detached.\n')
+                # only if selection is not empty and the file is in the attachment list
+                if filetodetach != '' and filetodetach in attachments:
+                    attachments.remove(filetodetach)
+                    ewrite('Attachment file "%s" successfully detached.\n\n', filetodetach)
+                else:
+                    ewrite('Nothing to detach.\n\n')
         elif x == 'c':
             ed = ui.get_filename('Choose editor: ', default=options.editor)
             if ed:
diff --git a/debian/changelog b/debian/changelog
index d28d941..26aac8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,8 +8,11 @@ reportbug (4.6) UNRELEASED; urgency=low
   * reportbug/submit.py
     - added support for gnupg-agent with signing emails; thanks to Mathias
       Brodala or the report and Carl Chenet for the patch: Closes: #435818
+  * bin/reportbug
+    - allow ENTER to exit from file detaching menu (and enforced file checking);
+      thanks to Rodrigo Campos for report and (partial) patch; Closes: 535789
 
- -- Sandro Tosi <morph at debian.org>  Fri, 03 Jul 2009 12:47:02 +0200
+ -- Sandro Tosi <morph at debian.org>  Sat, 11 Jul 2009 09:17:36 +0200
 
 reportbug (4.5) unstable; urgency=low
 

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list