Bug 431950

Summary: s-c-kickstart crashes on non-existing KS file
Product: Red Hat Enterprise Linux 5 Reporter: Michal Nowak <mnowak>
Component: system-config-kickstartAssignee: Chris Lumens <clumens>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 5.2CC: atodorov, grahamtaylor, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-kickstart-2.6.19.9-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 07:58:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
catch errors opening files none

Description Michal Nowak 2008-02-07 23:00:05 UTC
Description of problem:

s-c-kickstart crashes on non-existing KS file

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

system-config-kickstart-2.6.19.3-1.el5

How reproducible:
always

Steps to Reproduce:
.qa.[root@i386-5s-1-m1 tps]# system-config-kickstart ks-blah.cfg
Traceback (most recent call last):
  File "/usr/bin/system-config-kickstart", line 82, in ?
    kickstartGui.kickstartGui(file)
  File "/usr/share/system-config-kickstart/kickstartGui.py", line 91, in __init__
    self.parser.readKickstart(file)
  File "/usr/lib/python2.4/site-packages/pykickstart/parser.py", line 1071, in
readKickstart
    fh = open(file)
IOError: [Errno 2] No such file or directory: 'ks-blah.cfg'
  
Actual results:

crash

Expected results:

nice window msg about non existing file and exit

Additional info:

Note: ks-blah.cfg does not exist

Comment 1 Chris Lumens 2008-02-25 15:11:44 UTC
*** Bug 434771 has been marked as a duplicate of this bug. ***

Comment 2 Michal Nowak 2009-06-25 10:55:27 UTC
Still present in s-c-k-2.6.19.8-2.el5.

Comment 4 Chris Lumens 2011-01-03 18:48:47 UTC
Created attachment 471537 [details]
catch errors opening files

This patch should fix it up.  The slightly goofy error message is to make sure no additional translations need to be performed.

Comment 7 Alexander Todorov 2011-05-09 11:55:40 UTC
With system-config-kickstart-2.6.19.9-2.el5 executed the following command in gnome-terminal:

# system-config-kickstart blah-ks.cfg

An error dialog was shown:

---- Error Parsing Kickstart Config ----

The file "balh-ks.cfg" cannot be accessed

---------------------------- OK --------


Moving to VERIFIED.

Comment 8 errata-xmlrpc 2011-07-21 07:58:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1025.html