Bug 539615

Summary: Error in python bindings
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: PackageKitAssignee: Richard Hughes <richard>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: richard, smparrish
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-21 14:26:54 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:
Bug Depends On:    
Bug Blocks: 456906    
Attachments:
Description Flags
0001-Fixed-packagekit.client.what_provides-in-Python-bind.patch none

Description Tim Waugh 2009-11-20 17:49:30 UTC
Created attachment 372560 [details]
0001-Fixed-packagekit.client.what_provides-in-Python-bind.patch

Description of problem:
The python bindings for PackageKit use the wrong number of arguments for what_provides.

Version-Release number of selected component (if applicable):
PackageKit-0.5.4-0.3.20091029git.fc12.x86_64

How reproducible:
100%

Steps to Reproduce:
Run this:

#!/usr/bin/python
import packagekit.client
pk = packagekit.client.PackageKitClient ()
packages = pk.what_provides(packagekit.client.FILTER_NOT_INSTALLED,
                            packagekit.client.PROVIDES_MIMETYPE,
                            "image/x-xcf")
for package in packages:
    print str (package)
  
Actual results:
TypeError: iteration over non-sequence

Expected results:
List of packages.

Additional info:
Patch attached (created using git format-patch against current master).

Comment 1 Richard Hughes 2009-11-21 14:26:54 UTC
commit 09c55360b1262e89ec626fb4dc071ba5746a702b
Author: Tim Waugh <twaugh>
Date:   Fri Nov 20 17:38:52 2009 +0000

    Fixed packagekit.client.what_provides() in Python bindings.

Will be in 0.5.5 which is released in a little under two weeks. Yell if you want me the build an F12 update in the meantime.