Bug 580711

Summary: bugzilla cli falls down if bug does not contain a cc list
Product: [Fedora] Fedora Reporter: Neil Horman <nhorman>
Component: python-bugzillaAssignee: Will Woods <wwoods>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-bugzilla-0.6.1-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-22 22:37:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to not fail if a bug doesn't have some optional attributes none

Description Neil Horman 2010-04-08 20:25:21 UTC
Created attachment 405400 [details]
patch to not fail if a bug doesn't have some optional attributes

Description of problem:
The latest bugzilla install at Red Hat apparently doesn't always return a cc list in the xmlrpc response for a full query of a bug, resulting in a traceback and exit.  

Version-Release number of selected component (if applicable):


How reproducible:
often

Steps to Reproduce:
1.find a bug with no cc list item in bugzilla
2.bugzilla --user=X --pass=Y query -f --bug_id=<bz number from 1>

  
Actual results:
traceback

Expected results:
successful dump of bug

Additional info:
I've attached a patch below which fixes the issue

Comment 1 Will Woods 2010-04-08 20:30:14 UTC
As is my tradition, I'm using this bug to test the problem - hence my removing
myself from the CC list.

Anyone else reading this: Kindly do not add yourself to the CC list of this
bug, so it will stay empty.

Comment 2 Will Woods 2010-04-08 20:47:36 UTC
Probably the best solution here is to fix up the Bug object so bug.cc is always guaranteed to exist, even if it's an empty list. I'll have a patch that does this.. soonish.

P.S.: I'm sure you know this, but just for the record: "except: pass" is a great temporary workaround for the problem, but in general OH MAN NEVER DO THAT.

Comment 3 Fedora Update System 2010-04-16 19:26:54 UTC
python-bugzilla-0.6.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/python-bugzilla-0.6.1-1.fc13

Comment 4 Fedora Update System 2010-04-20 13:29:53 UTC
python-bugzilla-0.6.1-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-bugzilla'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-bugzilla-0.6.1-1.fc13

Comment 5 Fedora Update System 2010-04-22 22:35:18 UTC
python-bugzilla-0.6.1-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.