try:
ksparser.readKickstart(file)
- except IOError, e:
- if anaconda.intf:
- anaconda.intf.kickstartErrorWindow("Could not open kickstart file or included file named %s" % e.filename)
- sys.exit(1)
- else:
- stderrLog.critical(_("The following error was found while parsing the kickstart "
- "configuration file:
%s") % e)
- sys.exit(1)
- except KickstartError, e:
+ except (KickstartValueError, KickstartParseError) as e:
if anaconda.intf:
anaconda.intf.kickstartErrorWindow(e.__str__())
sys.exit(1)
@@ -1255,6 +1247,14 @@ def preScriptPass(anaconda, file):
stderrLog.critical(_("The following error was found while parsing the kickstart "
"configuration file:
%s") % e)
sys.exit(1)
+ except KickstartError as e:
+ if anaconda.intf:
+ anaconda.intf.kickstartErrorWindow("Could not open kickstart file or included file named %s" % file)
+ sys.exit(1)
+ else:
+ stderrLog.critical(_("The following error was found while parsing the kickstart "
+ "configuration file:
try:
ksparser.readKickstart(file)
- except IOError, e:
- # We may not have an intf now, but we can do better than just raising
- # the exception.
+ except (KickstartValueError, KickstartParseError) as e:
if anaconda.intf:
- anaconda.intf.kickstartErrorWindow("Could not open kickstart file or included file named %s" % e.filename)
+ anaconda.intf.kickstartErrorWindow(e.__str__())
sys.exit(1)
else:
stderrLog.critical(_("The following error was found while parsing the kickstart "
"configuration file:
%s") % e)
sys.exit(1)
- except KickstartError, e:
+ except KickstartError as e:
+ # We may not have an intf now, but we can do better than just raising
+ # the exception.
if anaconda.intf:
- anaconda.intf.kickstartErrorWindow(e.__str__())
+ anaconda.intf.kickstartErrorWindow("Could not open kickstart file or included file named %s" % file)
sys.exit(1)
else:
stderrLog.critical(_("The following error was found while parsing the kickstart "
--
1.7.1.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list