Bug 426534 - TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line' referenced before assignment
Summary: TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line' referen...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-iniparse
Version: 8
Hardware: athlon
OS: Linux
low
low
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-21 21:18 UTC by Black Knight
Modified: 2008-02-21 12:32 UTC (History)
1 user (show)

Fixed In Version: 0.2.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-21 12:32:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Black Knight 2007-12-21 21:18:20 UTC
+++ This bug was initially created as a clone of Bug #426326 +++

When I try to update, or add remove software I recieve this message:

exception occurred 

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

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

-- Additional comment from blackknight2500 on 2007-12-19 21:22 EST --
Created an attachment (id=290100)
 TB29ec97ad ini.py:563:readfp:UnboundLocalError: local variable 'line'
referenced before assignment


-- Additional comment from tim.lauridsen on 2007-12-20 03:25 EST --
Fixed in the latest version of python-iniparse please update.

-- Additional comment from blackknight2500 on 2007-12-20 18:34 EST --
The problem is I get this error message when I update.

-- Additional comment from blackknight2500 on 2007-12-20 18:55 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 1 Tim Lauridsen 2008-02-21 12:32:49 UTC
this issue is fixed in the latest verisons of python-iniparse.

File "/usr/lib/python2.5/site-packages/iniparse/ini.py", line 563, in readfp
    if line and line[-1]=='\n':

(this is line 564, in the latest releases)



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