comment.attachments crashes in HTML connector
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-launchpad-bugs |
Fix Released
|
Undecided
|
Markus Korn |
Bug Description
>>> import launchpadbugs.
>>> Bug = Connector.
>>> b = Bug(135425)
>>> print b.comments[
set([Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
if self.is_down:
File "/usr/lib/
self.
File "/usr/lib/
if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
File "/usr/lib/
return self.edit_
File "/usr/lib/
if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
File "/usr/lib/
return utils.valid_
AttributeError: 'Attachment' object has no attribute '_edit'
>>>
Related branches
Changed in python-launchpad-bugs: | |
assignee: | nobody → thekorn |
status: | New → In Progress |
The main problem here is that the attachments have to be parsed before they can be shown via b.comments[ 0].attachemnts.
A workaround is
In [23]: b = Bug(135425)
In [24]: b.attachments
Out[24]: <Attachmentlist>
In [25]: print b.comments[ 0].attachments
set([<Attachment (up: #9038689)>])
Fixing this should be a one-liner, will work on it this evening.
When I understood you correct, you would like to know when a certain file was attached. I Always thought you can get this by running:
b = bug(123456) x.comment] .date
x = b.attachments[0]
print b.comments[
But obviously the .comment attribute of an Attachment-object got lost somewhere, I'm pretty sure this worked somewhere in the past.
I think I will also fix this.
Markus