Bug 753891 - python-iniparse's defaults() function results in "ValueError: too many values to unpack"
Summary: python-iniparse's defaults() function results in "ValueError: too many values...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python-iniparse
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Filip Holec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-14 19:10 UTC by Alex Wood
Modified: 2018-11-05 08:23 UTC (History)
4 users (show)

Fixed In Version: python-iniparse-0.2.3-6.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-31 15:44:23 UTC
Target Upstream Version:


Attachments (Terms of Use)
Script to test this bug. (732 bytes, text/plain)
2011-11-14 19:13 UTC, Alex Wood
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 752854 0 unspecified CLOSED ValueError: too many values to unpack 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2012:1128 0 normal SHIPPED_LIVE python-iniparse bug fix update 2012-07-31 19:43:35 UTC

Internal Links: 752854

Description Alex Wood 2011-11-14 19:10:41 UTC
Description of problem:
When using the defaults() function in python-iniparse, a "ValueError: too many values to unpack" is printed.

Version-Release number of selected component (if applicable):  python-iniparse-0.2.3-4.el5

How reproducible: Always

Steps to Reproduce:
1. Download the attached script to a RHEL 5.7 machine.
2. Run the script
3. View the results
  
Actual results:
CORRECTED BEHAVIOR
{'foo': 'bar'}

ORIGINAL BEHAVIOR
Traceback (most recent call last):
  File "./defaults.py", line 30, in ?
    print cp.defaults()
  File "/usr/lib/python2.4/site-packages/iniparse/compat.py", line 38, in defaults
    for name, lineobj in self.data._defaults._options:
ValueError: too many values to unpack

Expected results:
CORRECTED BEHAVIOR
{'foo': 'bar'}

ORIGINAL BEHAVIOR
{'foo': 'bar'}

Additional info:
See http://code.google.com/p/iniparse/issues/detail?id=9

Comment 1 Alex Wood 2011-11-14 19:13:15 UTC
Created attachment 533603 [details]
Script to test this bug.

Comment 4 Filip Holec 2012-07-23 15:27:21 UTC
Running the script with python-iniparse-0.2.3-5.el5 causes error :

CORRECTED BEHAVIOR
{'foo': 'bar'}

ORIGINAL BEHAVIOR
Traceback (most recent call last):
  File "./defaults.py", line 30, in ?
    print cp.defaults()
  File "/usr/lib/python2.4/site-packages/iniparse/compat.py", line 40, in defaults
    d[name] = secobj._compat_get(name)
TypeError: 'Undefined' object is not callable

(+ failed unit-tests https://bugzilla.redhat.com/show_bug.cgi?id=842323)

--------------------------------------------------------------

Testing on :

DISTRO = RHEL5-Server-U8
ARCHITECTURE = x86_64

Comment 5 James Antill 2012-07-23 20:24:02 UTC
 Ok, I just used the fix from the test code instead of the upstream fix (as that appears to rely on other changes which we don't have).

Comment 9 errata-xmlrpc 2012-07-31 15:44:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1128.html


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