Parsing multiple source packages in a bug
Bug #79546 reported by
Alex Muntada
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bug Helper |
Fix Released
|
High
|
Daniel Holbach |
Bug Description
Some bugs like bug 77442 have several source packages listed. If you fetch https:/
<title>Bug #77442 in vnc (Ubuntu): ...
Since there's different source packages for this bug there's also the change to get a different name each time, depending on the fetching method and LP behaviour. It seems that the last source package is listed, but I could be wrong (maybe we should ask LP developers).
(Found while working on bug 79247)
description: | updated |
description: | updated |
To post a comment you must log in.
The diff below against latest Daniel's branch shows the problem and how to get a full list of source packages. Since there are more than one, I guess that self.sourcepackage should be a list (or set); but I have to figure out how the whole thing works yet, so I can provide a wider patch.
Please, note that those "print" lines on the diff are only for debugging purposes, to let you see the multiple source package results for each bug.
== modified file 'bugHelper/ HTMLOperations. py' HTMLOperations. py 2007-01-15 16:38:45 +0000 HTMLOperations. py 2007-01-15 23:21:30 +0000
sock. close()
--- bugHelper/
+++ bugHelper/
@@ -61,8 +61,10 @@
if not len(self. sourcepackage) : ackage = re.findall( titleFilter, self.text) ackage = re.findall( viewstatusFilte r, self.text) ackage
self. sourcepackage = filteredSourceP ackage[ 0]
- titleFilter = '<title>Bug #[0-9]* in (.*?) .*: .*'
- filteredSourceP
+ viewstatusFilter = 'viewstatus">([^ ]*) [^<]*</a>'
+ filteredSourceP
+ print bugnumber
+ print filteredSourceP
if cl.attachments: