Bug 998256 - raw output: ATTRIBUTE[_dowhiteboard]: <bound method _Bug._dowhiteboard of <Bug #871637 on https://bugzilla.redhat.com/xmlrpc.cgi at 0xda7dd0>>
Summary: raw output: ATTRIBUTE[_dowhiteboard]: <bound method _Bug._dowhiteboard of <Bu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bugzilla
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-18 16:29 UTC by Steve Tyler
Modified: 2014-04-09 00:56 UTC (History)
6 users (show)

Fixed In Version: python-bugzilla-1.0.0-2.fc19
Clone Of:
Environment:
Last Closed: 2014-04-09 00:56:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[debugging] bz998256-raw-field-type-debugging-1.patch (707 bytes, patch)
2013-08-18 16:59 UTC, Steve Tyler
no flags Details | Diff

Description Steve Tyler 2013-08-18 16:29:55 UTC
Description of problem:
Some fields in raw output have a value beginning: '<bound method _Bug':

$ bugzilla query -b 871637 --raw | fgrep '<bound method _Bug' | head -1
ATTRIBUTE[_dowhiteboard]: <bound method _Bug._dowhiteboard of <Bug #871637 on https://bugzilla.redhat.com/xmlrpc.cgi at 0x246add0>>

Version-Release number of selected component (if applicable):
python-bugzilla-0.9.0-1.fc19.noarch

How reproducible:
Always.

Steps to Reproduce:
1. $ bugzilla query -b 871637 --raw | fgrep '<bound method _Bug'

Actual results:

The first string returned:

ATTRIBUTE[_dowhiteboard]: <bound method _Bug._dowhiteboard of <Bug #871637 on https://bugzilla.redhat.com/xmlrpc.cgi at 0x17c6dd0>>

There are 22 in all:

$ bugzilla query -b 871637 --raw | fgrep '<bound method _Bug' | wc -l
22

Expected results:
A field value is displayed, or nothing at all. 

Additional info:

Comment 1 Steve Tyler 2013-08-18 16:59:53 UTC
Created attachment 787795 [details]
[debugging] bz998256-raw-field-type-debugging-1.patch

This debugging patch shows that the test in line 696 is incomplete. In particular, the test fails to detect attributes of <type 'instancemethod'>:

ATTRIBUTE[_dowhiteboard]: (<type 'instancemethod'>) <bound method _Bug._dowhiteboard of <Bug #986069 on https://bugzilla.redhat.com/xmlrpc.cgi at 0x256fc10>>

$ less -N python-bugzilla-0.9.0/bin/bugzilla
...
    690 def _format_output(bz, opt, buglist):
    691     if opt.output == 'raw':
    692         buglist = bz.getbugs([b.bug_id for b in buglist])
    693         for b in buglist:
    694             print "Bugzilla %s: " % b.bug_id
    695             for a in dir(b):
    696                 if a.startswith("__") and a.endswith("__"):
    697                     continue
    698                 print to_encoding(u"ATTRIBUTE[%s]: %s" % (a, getattr(b, a)))
    699             print "\n\n"
    700         return
...

Comment 2 Cole Robinson 2013-10-28 17:48:33 UTC
Fixed upstream now:

commit 0fc2285690a96fdc9d04d6946af1c25ea5102ac5
Author: Cole Robinson <crobinso>
Date:   Mon Oct 28 13:46:56 2013 -0400

    bugzilla: Don't show methods in --raw output (bz 998256)

Comment 3 Fedora Update System 2014-03-25 22:44:30 UTC
python-bugzilla-1.0.0-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-bugzilla-1.0.0-1.fc19

Comment 4 Fedora Update System 2014-03-27 04:47:28 UTC
Package python-bugzilla-1.0.0-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-bugzilla-1.0.0-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4391/python-bugzilla-1.0.0-1.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-03-27 17:13:51 UTC
python-bugzilla-1.0.0-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-bugzilla-1.0.0-2.fc19

Comment 6 Fedora Update System 2014-04-09 00:56:11 UTC
python-bugzilla-1.0.0-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.