Bug 1033594 - dnf API base.do_transaction fails in python3
Summary: dnf API base.do_transaction fails in python3
Keywords:
Status: CLOSED DUPLICATE of bug 1033596
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 12:54 UTC by Tim Lauridsen
Modified: 2013-11-25 07:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-25 07:55:22 UTC
Type: Bug


Attachments (Terms of Use)
api example to reproduce the issue (1.63 KB, text/plain)
2013-11-22 12:54 UTC, Tim Lauridsen
no flags Details

Description Tim Lauridsen 2013-11-22 12:54:57 UTC
Created attachment 827752 [details]
api example to reproduce the issue

Description of problem:

Attached example fails in python3, works in python2


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

0.4.8-1


How reproducible:
every time


Steps to Reproduce:
1. sudo python3 dnf-api.py
2.
3.

Actual results:

cachedir: /var/cache/dnf/i386/20
=============== install btanks =====================
# of packages added : 1
<hawkey.Goal object at 0xb6c3ef2c>
   Install - btanks-0.9.8083-7.fc20.i686
   Install - btanks-data-0.9.8083-7.fc20.noarch
[<hawkey.Package object id 3038, btanks-0.9.8083-7.fc20.i686, fedora>, <hawkey.Package object id 3039, btanks-data-0.9.8083-7.fc20.noarch, fedora>]
Downloading Packages
{}
Running Transaction
Traceback (most recent call last):
  File "test.py", line 84, in <module>
    base.do_install()
  File "test.py", line 78, in do_install
    print(self.do_transaction())
  File "/usr/lib/python3.3/site-packages/dnf/base.py", line 627, in do_transaction
    self.transaction.populate_rpm_ts(self.ts)
  File "/usr/lib/python3.3/site-packages/dnf/transaction.py", line 183, in populate_rpm_ts
    ts.addInstall(hdr, tsi, 'i')
  File "/usr/lib/python3.3/site-packages/rpm/transaction.py", line 48, in addInstall
    if isinstance(item, basestring):
NameError: global name 'basestring' is not defined

Expected results:
No Traceback

Additional info:

Comment 1 Tim Lauridsen 2013-11-25 07:55:22 UTC

*** This bug has been marked as a duplicate of bug 1033596 ***


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