Bug 1126162 - python-bugzilla: unable to get attachments
Summary: python-bugzilla: unable to get attachments
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bugzilla
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-02 22:36 UTC by Need Real Name
Modified: 2014-08-05 10:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-05 10:52:40 UTC


Attachments (Terms of Use)

Description Need Real Name 2014-08-02 22:36:16 UTC
Description of problem:

Unable to get attachments:

% bugzilla --nosslverify attach
Usage: bugzilla [global options] COMMAND [command-options]
Commands: login, new, query, modify, attach, info

bugzilla: error: Bug ID must be specified for setting attachments
meatwad% bugzilla --nosslverify attach --getall=192337
Traceback (most recent call last):
  File "/usr/local/bin/bugzilla", line 1250, in <module>
    main()
  File "/usr/local/bin/bugzilla", line 1228, in main
    _do_get_attach(bz, opt, parser, args)
  File "/usr/local/bin/bugzilla", line 1031, in _do_get_attach
    opt.get += [a['id'] for a in bug.attachments]
  File "/usr/local/lib/python2.7/site-packages/bugzilla/bug.py", line 105, in __getattr__
    raise AttributeError("Bug object has no attribute '%s'" % name)
AttributeError: Bug object has no attribute 'attachments'



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

How reproducible:

Install version 1.1.0, patch the default bugzilla installation:

-default_bz = 'https://bugzilla.redhat.com/xmlrpc.cgi'
+default_bz = 'https://bugs.FreeBSD.org/bugzilla/xmlrpc.cgi'

Steps to Reproduce:

See above

Actual results:

see above

Expected results:

Downloading attachment.
Additional info:

Comment 1 Cole Robinson 2014-08-05 10:52:40 UTC
This had some code that was specific to an bugzilla.redhat.com extension, fixed upstream to work more generally now:

commit 2423299bd35aea958091827f552dc4e3adb0cd75
Author: Cole Robinson <crobinso@redhat.com>
Date:   Tue Aug 5 11:39:23 2014 +0200

    bin/bugzilla: Support attach --getall for non-RH bugzilla (bz 1126162)


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