Bug 476381 - yum referenced but not imported
Summary: yum referenced but not imported
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-13 21:36 UTC by Mads Kiilerich
Modified: 2009-01-27 01:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-16 09:09:15 UTC


Attachments (Terms of Use)

Description Mads Kiilerich 2008-12-13 21:36:09 UTC
Description of problem:

Error Type: <type 'exceptions.NameError'>
Error Value: global name 'yum' is not defined
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2280, in <module>
    main()
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2276, in main
    backend = PackageKitYumBackend('', lock=True)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 191, in __init__
    if not self.comps.connect():
  File : /usr/share/PackageKit/helpers/yum/yumComps.py, line 233, in connect
    self._make_database_tables()
  File : /usr/share/PackageKit/helpers/yum/yumComps.py, line 250, in _make_database_tables
    self.refresh()
  File : /usr/share/PackageKit/helpers/yum/yumComps.py, line 260, in refresh
    except yum.Errors.RepoError, e:


Version-Release number of selected component (if applicable):
PackageKit-yum-0.3.12-1.fc10.i386

Additional info:
yum is only imported in main but used in lib.

If the __main__ part had been placed in a main() function instead of conditionally in the global namespace then pylint would have caught this.

Comment 1 Richard Hughes 2008-12-16 09:09:15 UTC
I've fixed this in 0_3_X and master. I'll be in the next release in about a weeks time. Thanks dude.

Comment 2 Fedora Update System 2009-01-08 17:11:10 UTC
PackageKit-0.3.13-1.fc10,gnome-packagekit-0.3.13-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/PackageKit-0.3.13-1.fc10,gnome-packagekit-0.3.13-1.fc10

Comment 3 Fedora Update System 2009-01-27 01:56:39 UTC
PackageKit-0.3.13-1.fc10, gnome-packagekit-0.3.13-1.fc10 has been pushed to the Fedora 10 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.