Print error when kickstart is missing (#1052872)

This commit is contained in:
Brian C. Lane 2014-01-14 11:29:30 -08:00
parent acaeb665e0
commit dc017445ff

View File

@ -907,6 +907,9 @@ if __name__ == '__main__':
# Parse the kickstart # Parse the kickstart
if opts.ks: if opts.ks:
if not os.path.exists(opts.ks[0]):
log.error("kickstart file ({0}) is missing.".format(opts.ks[0]))
sys.exit(1)
ks_version = makeVersion() ks_version = makeVersion()
ks = KickstartParser( ks_version, errorsAreFatal=False, missingIncludeIsFatal=False ) ks = KickstartParser( ks_version, errorsAreFatal=False, missingIncludeIsFatal=False )
ks.readKickstart( opts.ks[0] ) ks.readKickstart( opts.ks[0] )