Bug 313151 - UnboundLocalError: local variable 'line' referenced before assignment
UnboundLocalError: local variable 'line' referenced before assignment
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-iniparse (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Tim Lauridsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-30 12:46 EDT by Eric Paris
Modified: 2008-11-29 10:27 EST (History)
0 users

See Also:
Fixed In Version: 0.2.2-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-26 13:47:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Please Help No Media player is running on my pc (1.42 KB, application/octet-stream)
2008-11-29 10:27 EST, faisaldiit
no flags Details

  None (edit)
Description Eric Paris 2007-09-30 12:46:45 EDT
Description of problem:

I installed F8T1 (actually out of RHTS) on an x86_64 machine and ran

yum update yum\* rpm\*

after that EVERY yum command backtraces with:

[root@nec-em12 ~]# yum list kernel
Loading "refresh-updatesd" plugin
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 82, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 154, in getOptionsConfig
    disabled_plugins=opts.disableplugins)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 164, in _getConfig
    self.getReposFromConfig()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 229, in
getReposFromConfig
    parser.readfp(confpp_obj)
  File "/usr/lib/python2.5/site-packages/iniparse/compat.py", line 106, in readfp
    self.data.readfp(fp)
  File "/usr/lib/python2.5/site-packages/iniparse/ini.py", line 563, in readfp
    if line and line[-1]=='\n':
UnboundLocalError: local variable 'line' referenced before assignment

I actually commented out the 2 lines of code in ini.py which cause the problem
and ran a complete yum update to rawhide.  I'm getting the same thing.....

[root@nec-em12 ~]# rpm -q yum rpm python python-iniparse
yum-3.2.5-4.fc8
rpm-4.4.2.2-0.5.rc2
python-2.5.1-11.fc8
python-iniparse-0.2.2-1.fc8

I actually did this with 2 different machines from RHTS, so it seems to be
easily reproducable.
Comment 1 Tim Lauridsen 2007-10-01 03:32:25 EDT
What is RHTS ?

Please attach your *.repo files from /etc/yum.repos.d/

Comment 2 Tim Lauridsen 2007-10-01 04:14:55 EDT
Ok i can reproduce the error is a empty *.repo file exists the the error occours.

I have submitted a patch upstream, but it will take some time to hit the repos.

So delete the the blank *.repo file as a workaround.
Comment 3 Eric Paris 2007-10-01 11:52:40 EDT
RHTS is the Red Hat internal test system.  If the owner of this bug was internal
they could have used RHTS to reproduce.  Sorry I still forget how many great
external package owners we have.

The blank .repo was exactly the problem.  Deleted it and everything is working
great.  Thanks for the quick solution!
Comment 4 Fedora Update System 2007-11-20 12:45:16 EST
python-iniparse-0.2.2-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-iniparse'
Comment 5 Fedora Update System 2007-11-20 13:07:42 EST
python-iniparse-0.2.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-iniparse'
Comment 6 Fedora Update System 2007-11-26 13:47:35 EST
python-iniparse-0.2.2-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2007-11-26 13:53:45 EST
python-iniparse-0.2.2-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 faisaldiit 2008-11-29 10:27:15 EST
Created attachment 325090 [details]
Please Help No Media player is running on my pc

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