Hide Forgot
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
Created attachment 533603 [details] Script to test this bug.
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
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).
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