Merge ubottu Bugtracker with bzr.

Treat the Architecture key from apt-cache as a list, rather than a single string.
This commit is contained in:
tsimpson
2012-04-10 14:05:29 +01:00
parent 3d087845f1
commit f0d7e799d1
2 changed files with 29 additions and 5 deletions

View File

@ -772,8 +772,22 @@ class Launchpad(IBugtracker):
if tasks.total_size != 1:
tasks = list(tasks)
tasks.sort(self._sort)
taskdata = tasks[-1]
try:
tasks.sort(self._sort)
taskdata = tasks[-1]
except ValueError:
tasks = [_ for _ in tasks if _.bug_target_name.endswith(u'(Ubuntu)')]
if tasks:
if len(tasks) != 1:
try:
tasks.sort(self._sort)
taskdata = tasks[-1]
except ValueError:
taskdata = bugdata.bug_tasks[bugdata.bug_tasks.total_size - 1]
else:
taskdata = tasks[-1]
else:
taskdata = tasks[-1]
else:
taskdata = tasks[0]