~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to utilities/massage-bug-import-xml

  • Committer: Gavin Panella
  • Date: 2011-11-23 16:58:16 UTC
  • mto: This revision was merged to the branch mainline in revision 14376.
  • Revision ID: gavin.panella@canonical.com-20111123165816-tarehp2pjedldogm
Prettier way to resolve duplicates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
        dupe_of = duplicates.get(bug_id)
78
78
        return (bug_id if dupe_of is None else resolve(dupe_of))
79
79
 
80
 
    for bug_id in duplicates:
81
 
        duplicates[bug_id] = resolve(bug_id)
 
80
    duplicates = dict(
 
81
        (bug_id, resolve(bug_id)) for bug_id in duplicates)
82
82
 
83
83
    # Scan the tree, fixing up issues.
84
84
    for bug in root.findall('{%s}bug' % NS):