[OH-Dev] [issue790] bugzilla bug importer crashes with AttributeError
Asheesh Laroia
bugs at openhatch.org
Fri Nov 16 20:01:41 UTC 2012
New submission from Asheesh Laroia <asheesh at asheesh.org>:
When handle_query_response() gets a tracking bug XML response, it crashes.
Sample URL: https://bugzilla.redhat.com/show_bug.cgi?ctype=xml&id=509829
File "/home/deploy/oh-bugimporters/bugimporters/bugzilla.py", line 84, in
handle_query_response
bug_ids = self.handle_tracking_bug_xml(response.body)
File "/home/deploy/oh-bugimporters/bugimporters/bugzilla.py", line 123, in
handle_tracking_bug_xml
self.bug_ids.extend([int(depend.text) for depend in depends])
exceptions.AttributeError: 'BugzillaBugImporter' object has no attribute 'bug_ids'
We should be returning bug_ids, not modifying self.bug_ids. We should make sure this particular case
gets covered in the test suite.
To fix this, take the following steps:
* Create a new test method in some existing class in
bugimporters/tests/test_bugzilla.py
* Make sure the above URL appears in the list of queries for the TrackerModel
(usually self.tm or "tm").
* Then run the test suite and watch it crash. Fix the crashes and now you'll get
bugs imported in the test.
Yay.
----------
messages: 3505
nosy: paulproteus
priority: bug
status: unread
title: bugzilla bug importer crashes with AttributeError
__________________________________________
Roundup issue tracker <bugs at openhatch.org>
<https://openhatch.org/bugs/issue790>
__________________________________________
More information about the Devel
mailing list