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

Sandro Tosi morph at debian.org
Mon Jan 4 18:32:16 UTC 2010


The following commit has been merged in the master branch:
commit ddd51919daa29be574e123bd882d077c8776bf3f
Author: Sandro Tosi <morph at debian.org>
Date:   Mon Jan 4 12:25:41 2010 +0100

    expanded the previous fix to consider either bugs submitted against the binary (pseudo-header 'Package') or the source (pseudo-header 'Source') package; thanks to Laurent Fousse for the report; Closes: #559065

diff --git a/debian/changelog b/debian/changelog
index 8f6dd8c..12d943d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,9 @@ reportbug (4.10~WIP) UNRELEASED; urgency=low
       Zalewski for the report; Closes: #560302
     - retrieve the package information from the report using doing a lower-case
       check; thanks to Dan Greene for the report; Closes: #562912
+    - expanded the previous fix to consider either bugs submitted against the
+      binary (pseudo-header 'Package') or the source (pseudo-header 'Source')
+      package; thanks to Laurent Fousse for the report; Closes: #559065
   * share/presubj
     - refer to reportbug.d.o instead of bugs.d.o as SMTP server; thanks to Karl
       Goetz for the report and patch; Closes: #561802
@@ -52,7 +55,7 @@ reportbug (4.10~WIP) UNRELEASED; urgency=low
       emacsclient to reuse an existing emacs instance (if any); thanks to Dan
       Jacobson for the report and Håkon Stordahl for the patch; Closes: #367298
 
- -- Sandro Tosi <morph at debian.org>  Mon, 04 Jan 2010 10:45:50 +0100
+ -- Sandro Tosi <morph at debian.org>  Mon, 04 Jan 2010 12:21:36 +0100
 
 reportbug (4.9) unstable; urgency=low
 
diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index fac76bc..8c2ab71 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -405,8 +405,17 @@ def show_report(number, system, mirrors,
         ewrite('No report available: #%s\n', number)
         raise NoBugs
 
-    # extract the package name
-    foundpackage = info[1][0].lower().split('package: ')[1].split('\n')[0]
+    # extract the package name, either it's reported against
+    # the binary package or the source one
+    foundpackage = info[1][0].lower()
+    try:
+        foundpackage = foundpackage.split('package: ')[1].split('\n')[0]
+    except IndexError:
+        try:
+            foundpackage = foundpackage.split('source: ')[1].split('\n')[0]
+        except:
+            ewrite('Cannot retrieve bug\'s package, exiting...\n')
+            sys.exit(-1)
 
     (title, messages) = info
     # save report subject in main

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list