[PATCH] If there are errors processing the kickstart file early on, just print them.
Chris Lumens
clumens at redhat.com
Wed May 1 20:17:45 UTC 2013
We don't have an interface yet to use, so printing looks better than displaying
a traceback.
---
pyanaconda/kickstart.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 3ed6621..6442ca5 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1462,7 +1462,7 @@ class AnacondaKSParser(KickstartParser):
self.registerSection(TracebackScriptSection(self.handler, dataObj=self.scriptClass))
self.registerSection(PackageSection(self.handler))
self.registerSection(AddonSection(self.handler))
-
+
def preScriptPass(f):
# The first pass through kickstart file processing - look for %pre scripts
# and run them. This must come in a separate pass in case a script
@@ -1472,7 +1472,9 @@ def preScriptPass(f):
try:
ksparser.readKickstart(f)
except KickstartError as e:
- errorHandler.cb(KickstartError(), e)
+ # We do not have an interface here yet, so we cannot use our error
+ # handling callback.
+ print e
sys.exit(1)
# run %pre scripts
@@ -1497,7 +1499,9 @@ def parseKickstart(f):
try:
ksparser.readKickstart(f)
except KickstartError as e:
- errorHandler.cb(KickstartError(), e)
+ # We do not have an interface here yet, so we cannot use our error
+ # handling callback.
+ print e
sys.exit(1)
return handler
--
1.8.1.2
More information about the anaconda-patches
mailing list