Bug 476381 - yum referenced but not imported
yum referenced but not imported
Product: Fedora
Classification: Fedora
Component: PackageKit (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-12-13 16:36 EST by Mads Kiilerich
Modified: 2009-01-26 20:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-16 04:09:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mads Kiilerich 2008-12-13 16:36:09 EST
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>
  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
  File : /usr/share/PackageKit/helpers/yum/yumComps.py, line 250, in _make_database_tables
  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):

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 04:09:15 EST
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 12:11:10 EST
PackageKit-0.3.13-1.fc10,gnome-packagekit-0.3.13-1.fc10 has been submitted as an update for Fedora 10.
Comment 3 Fedora Update System 2009-01-26 20:56:39 EST
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.