accessing message 0 of bug 371281 gives wrong return type of IMessage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Gavin Panella |
Bug Description
The following code produces a "500 Internal Server Error":
>>> bug = launchpad.
>>> try:
... print bug.messages[0]
... except HTTPError as error:
... print error.content
...
NoCanonicalUrl
>>>
I had a chat with thumper, who analyzed the problem:
<Ampelbein> hi there. Trying to access message 0 of bug 371281 on staging and edge gives me a "500 Internal Server Error" with the content "NoCanonicalUrl": http://
<Ampelbein> via python-launchpadlib that is
* thumper looks for Ampelbein
<thumper> Ampelbein: my guess is "it's a bug"
<thumper> Ampelbein: the return type of the messages is "IMessage" which doesn't have a defined url
<thumper> Ampelbein: it should really be something like "IBugMessage" which has a location (permalink)
Related branches
- Guilherme Salgado (community): Approve (release-critical)
- Abel Deuring (community): Approve
-
Diff: 140 lines (+92/-4)4 files modifiedlib/canonical/launchpad/interfaces/message.py (+7/-1)
lib/lp/bugs/model/bug.py (+13/-3)
lib/lp/bugs/tests/test_bug_messages.py (+44/-0)
lib/lp/bugs/tests/test_bugs_webservice.py (+28/-0)
affects: | launchpad → malone |
tags: | added: api oops |
Changed in malone: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: bug-page |
Changed in malone: | |
assignee: | nobody → Gavin Panella (allenap) |
Changed in malone: | |
status: | Triaged → In Progress |
Changed in malone: | |
status: | Fix Committed → Fix Released |
OOPS-1371EB1331 seems to be an example of this.