Bug 445773 - Problem in "yumdownloader --resolve gcc" resulting in a Python traceback
Problem in "yumdownloader --resolve gcc" resulting in a Python traceback
Status: CLOSED DUPLICATE of bug 391791
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-utils (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: James Antill
James Antill
Depends On:
  Show dependency treegraph
Reported: 2008-05-08 20:47 EDT by Filipe Brandenburger
Modified: 2008-05-09 00:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-09 00:51:34 EDT
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 Filipe Brandenburger 2008-05-08 20:47:28 EDT
Description of problem:

There is a Python bug in yumdownloader that triggers with the command
"yumdownloader --resolve gcc". The problem was identified on CentOS, but it is
clearly a Python bug. There is one line of Python that tests "if other == None"
when the correct is using the "is" operator, testing "if other is None".

The URL I posted is to the message in CentOS mailing list where the problem was

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


How reproducible:


Steps to Reproduce:
1. yum install yum-utils
2. yumdownloader --resolve gcc

Actual results:

# yumdownloader --resolve gcc
Loading "priorities" plugin
Loading "installonlyn" plugin
Excluding Packages from CentOS-5 - Base
Excluding Packages from CentOS-5 - Updates
263 packages excluded due to repository priority protections
Traceback (most recent call last):
 File "/usr/bin/yumdownloader", line 191, in ?
 File "/usr/bin/yumdownloader", line 159, in main
  if not pkg in toDownload:
 File "/usr/lib/python2.4/site-packages/yum/packages.py", line 191, in __eq__
  if other == None:
 File "/usr/lib/python2.4/site-packages/yum/transactioninfo.py", line 403, in
  if self.name > other.name:
AttributeError: 'NoneType' object has no attribute 'name'

Expected results:

# yumdownloader --resolve gcc
Loading "installonlyn" plugin
gcc-4.1.2-14.el5.x86_64.r 100% |=========================| 5.3 MB    00:10     

Additional info:

In line 191 of packages.py, the "is" operator should be used instead
of "==". The line should read:

       is other is None:

I changed my file and after that it worked fine.
Comment 1 James Antill 2008-05-09 00:51:34 EDT

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

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