BugzillaAPI._storeBugs() doesn't handle bugs not having an alias field

Bug #660873 reported by Graham Binns
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Graham Binns

Bug Description

Steps to reproduce:
Execute the following in bin/harness:
>>> from lp.bugs.externalbugtracker.bugzilla import Bugzilla
>>> b = Bugzilla('https://wwws.clamav.net/bugzilla')
>>> b = b.getExternalBugTrackerToUse()
>>> b.initializeRemoteBugDB(['2296'])

What happens:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/graham/launchpad/lp-branches/make-mailnotification-care-bug-656759/lib/lp/bugs/externalbugtracker/isolation.py", line 63, in wrapper
    return func(*args, **kwargs)
  File "/home/graham/launchpad/lp-branches/make-mailnotification-care-bug-656759/lib/lp/bugs/externalbugtracker/bugzilla.py", line 650, in initializeRemoteBugDB
    self._storeBugs(remote_bugs)
  File "/home/graham/launchpad/lp-branches/make-mailnotification-care-bug-656759/lib/lp/bugs/externalbugtracker/bugzilla.py", line 578, in _storeBugs
    if remote_bug['alias'] != '':
KeyError: 'alias'

What should happen:
_storeBugs() should handle the lack of an alias field appropriately (and if it's indicative of data being wonky, should handle *that* appropriately) instead of letting the KeyError bubble up.

Related branches

Graham Binns (gmb)
Changed in malone:
status: Triaged → In Progress
assignee: nobody → Graham Binns (gmb)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in malone:
milestone: none → 10.11
tags: added: qa-needstesting
Changed in malone:
status: In Progress → Fix Committed
Graham Binns (gmb)
tags: added: qa-ok
removed: qa-needstesting
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.