Merge lp:~cjohnston/launchpad-work-items-tracker/get-bug-assignee into lp:launchpad-work-items-tracker
Proposed by
Chris Johnston
Status: | Merged |
---|---|
Approved by: | Chris Johnston |
Approved revision: | 314 |
Merged at revision: | 313 |
Proposed branch: | lp:~cjohnston/launchpad-work-items-tracker/get-bug-assignee |
Merge into: | lp:launchpad-work-items-tracker |
Diff against target: |
16 lines (+5/-1) 1 file modified
lpworkitems/collect.py (+5/-1) |
To merge this branch: | bzr merge lp:~cjohnston/launchpad-work-items-tracker/get-bug-assignee |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt (community) | Approve | ||
Chris Johnston (community) | Needs Resubmitting | ||
Andy Doan | Pending | ||
Review via email: mp+169783@code.launchpad.net |
Commit message
Find assignee of the bug and assign it to them.
Description of the change
One way to create work items is to link bugs to tracked blueprints. If the bug is not filed under a tracked project however, there are issues with getting the assignee for the bug. Currently, it just defaults the assignee to whomever is assigned the blueprint. This MP attempts to fix that by checking to see if the bug has a proper assignee, and if so assigns that assignee, otherwise it will continue to assign the assignee of the blueprint.
To post a comment you must log in.
The general logic is fine, but I would advise against bare "except:" statements. This will catch any and all exception, even those which would otherwise point out blatant errors in the code such as NameError, SyntaxError, or AttributeError. You can easily and silently break the complete try: block with that. I suggest to rather just except the classes that can realistically happen, and have it actually crash on an unexpected exception.