Bug 426326 - TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line' referenced before assignment
TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line' referen...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python-iniparse (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Tim Lauridsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-19 21:22 EST by Black Knight
Modified: 2007-12-28 04:02 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.2.1-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-20 03:25:47 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)
TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line' referenced before assignment (1.43 KB, application/octet-stream)
2007-12-19 21:22 EST, Black Knight
no flags Details

  None (edit)
Description Black Knight 2007-12-19 21:22:34 EST
Component: pirut
Summary: TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line'
referenced before assignment

Traceback (most recent call last):
  File "/usr/sbin/pup", line 614, in <module>
    main()
  File "/usr/sbin/pup", line 606, in main
    pup = PackageUpdater(not options.autoapply, options.config)
  File "/usr/sbin/pup", line 85, in __init__
    GraphicalYumBase.__init__(self, False, config)
  File "/usr/lib/python2.5/site-packages/pirut/__init__.py", line 129, in __init__
    plugin_types=(yum.plugins.TYPE_CORE,))
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 113, in
doConfigSetup
    errorlevel=errorlevel)
  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

Local variables in innermost frame:
pending_lines: []
fp: <yum.parser.ConfigPreProcessor instance at 0x9b4a64c>
exc: None
self: 
cur_section_name: None
linecount: 0
cur_option_name: None
fname: file://///etc/yum.repos.d/Fedora-install-media.repo
cur_option: None
cur_section: None



Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Black Knight 2007-12-19 21:22:34 EST
Created attachment 290100 [details]
 TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line' referenced before assignment
Comment 2 Tim Lauridsen 2007-12-20 03:25:47 EST
Fixed in the latest version of python-iniparse please update.
Comment 3 Black Knight 2007-12-20 18:34:30 EST
The problem is I get this error message when I update.
Comment 4 Black Knight 2007-12-20 18:55:31 EST
This is an exception that occurred when I update:

An unhandled exception has occurred.  This is most likely a bug.  Please save
the crash dump and file a detailed bug report against pirut at
https://bugzilla.redhat.com/bugzilla

Thank you.
Comment 5 Tim Lauridsen 2007-12-28 04:02:13 EST
The problem occurs when you have a empty *.repo file in /etc/yum.repos.d/
i most cases it is a flash/adobe .repo file there is empty.
Just delete the empty file and everything will work again.

 

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