Bug 998256 - raw output: ATTRIBUTE[_dowhiteboard]: <bound method _Bug._dowhiteboard of <Bug #871637 on https://bugzilla.redhat.com/xmlrpc.cgi at 0xda7dd0>>
raw output: ATTRIBUTE[_dowhiteboard]: <bound method _Bug._dowhiteboard of <Bu...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-18 12:29 EDT by Steve Tyler
Modified: 2014-04-08 20:56 EDT (History)
6 users (show)

See Also:
Fixed In Version: python-bugzilla-1.0.0-2.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-08 20:56:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Steve Tyler 2013-08-18 12:29:55 EDT
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 12:59:53 EDT
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 13:48:33 EDT
Fixed upstream now:

commit 0fc2285690a96fdc9d04d6946af1c25ea5102ac5
Author: Cole Robinson <crobinso@redhat.com>
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 18:44:30 EDT
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 00:47:28 EDT
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 13:13:51 EDT
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-08 20:56:11 EDT
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.