I'm not sure if this is a python question or a launchpad question since I am new to both. I am getting a collection of bugs in a bug_task collection. I am running searchTasks. The API reference documentation says bug_link is a link to a bug object. The bug object has the id. I was hoping to be able to print out the bug id by just getting the attribute, but that is not working.
Here is the relevant snippet of code:
bug_tasks = series.searchTasks(status=['New'],importance=['Critical'])
for bug in bug_tasks: print(bug) bug_link=bug.bug_link bug_id=bug_link.id print(bug_id)When I run the script, I get the error
Traceback (most recent call last): File "./get_ubuntu_bug_list.py", line 39, in <module> bug_id=bug_link.id
AttributeError: 'unicode' object has no attribute 'id'I've also tried
bug_id=bug_link.get(id)
bug_id=get(bug_link.id)
bug_id=get(bug_link).idNone of those worked.
Any help on how to get the bug id from bug_link would be appreciated.
Thank you
2 Reset to default