Bug 313151

Summary: UnboundLocalError: local variable 'line' referenced before assignment
Product: [Fedora] Fedora Reporter: Eric Paris <eparis>
Component: python-iniparseAssignee: Tim Lauridsen <tla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.2.2-2.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-26 18:47:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Please Help No Media player is running on my pc none

Description Eric Paris 2007-09-30 16:46:45 UTC
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 07:32:25 UTC
What is RHTS ?

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



Comment 2 Tim Lauridsen 2007-10-01 08:14:55 UTC
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 15:52:40 UTC
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 17:45:16 UTC
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 18:07:42 UTC
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 18:47:35 UTC
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 18:53:45 UTC
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 15:27:15 UTC
Created attachment 325090 [details]
Please Help No Media player is running on my pc