Bug 476381 - yum referenced but not imported
yum referenced but not imported
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: PackageKit (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2008-12-16 04:09:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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>
    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 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.
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-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.