This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 558650 - Broken except statement in ksflatten
Broken except statement in ksflatten
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: pykickstart (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-25 17:21 EST by Jay Greguske
Modified: 2010-04-13 16:51 EDT (History)
2 users (show)

See Also:
Fixed In Version: pykickstart-1.69-1.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-01-26 09:57:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Trivial except statement fix (796 bytes, patch)
2010-01-25 17:21 EST, Jay Greguske
no flags Details | Diff

  None (edit)
Description Jay Greguske 2010-01-25 17:21:55 EST
Created attachment 386714 [details]
Trivial except statement fix

Description of problem:

Line 53 of ksflatten is anticipating an IOError with the normal error number and message set, but this is not the case. On an error condition ksparser.readKickstar() does raise an IOError, but with formatErrorMsg() as its error message so the except statement in ksflatten statement is only going to get one value. Since it is expecting two, the exception handling throws a ValueError exception.

How reproducible:
Always

Steps to Reproduce:
1. Create a kickstart file with a bogus %include statement.
2. Run `ksflatten your-ks-file.ks`
3. Complete the infinite tracklist challenge in Rock Band 2
4. Observe a value error thrown with no useful error message.
  
Actual results:
04:04 PM jgregusk@zyzyx:~/Code $ ksflatten rhevh-jay.ks 
Traceback (most recent call last):
  File "/usr/bin/ksflatten", line 71, in <module>
    main()
  File "/usr/bin/ksflatten", line 53, in main
    except IOError, (err, msg):
ValueError: need more than 1 value to unpack

Expected results:
04:04 PM jgregusk@zyzyx:~/Code $ ksflatten rhevh-jay.ks 
Failed to read kickstart file 'rhevh-jay.ks' : The following problem occurred on line 0 of the kickstart file:

Unable to open input kickstart file: Could not open/read file:///home/jgregusk/Code/whatever.ks

Additional info:
Trivial patch attached.
Comment 1 Chris Lumens 2010-01-26 09:57:09 EST
Thanks for the patch.
Comment 2 Fedora Update System 2010-03-10 11:03:48 EST
pykickstart-1.69-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/pykickstart-1.69-1.fc13
Comment 3 Fedora Update System 2010-03-23 20:44:57 EDT
pykickstart-1.69-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Darryl L. Pierce 2010-04-13 10:10:32 EDT
Can we have this fix backported to F12 as well? I'm experiencing the same problem.

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