Correcly handle NEW package bug closing (the task dosen't have a distribuiton attribute)

This commit is contained in:
Stefano Rivera 2011-08-25 18:41:57 +02:00
parent 165279fae9
commit 59b69d3767

View File

@ -454,9 +454,9 @@ def close_bugs(bugs, package, version, changes):
bug = bug.duplicate_of
for task in bug.bug_tasks:
target = task.target
if getattr(target, 'distribution', None) != ubuntu:
continue
if target == ubuntu or target.name == package:
if (target.name == package
and getattr(target, 'distribution', None) == ubuntu
) or target == ubuntu:
if task.status != 'Fix Released':
Logger.normal("Closed bug %s", task.web_link)
task.status = 'Fix Released'