[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] The script sections should operate on an AnacondaKSScript instance (#728468).



This is necessary to make sure they have a run method.
---
 pyanaconda/kickstart.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 9a8b636..15a46b2 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -51,7 +51,7 @@ from pykickstart.base import KickstartCommand, BaseData
 from pykickstart.constants import *
 from pykickstart.errors import formatErrorMsg, KickstartError, KickstartValueError, KickstartParseError
 from pykickstart.parser import Group, KickstartParser, Packages, Script
-from pykickstart.sections import PreScriptSection, NullSection
+from pykickstart.sections import *
 from pykickstart.version import returnClassForVersion
 
 import gettext
@@ -1259,6 +1259,12 @@ class AnacondaKSParser(KickstartParser):
         self.handler.add(retval)
         return retval
 
+    def setupSections(self):
+        self.registerSection(PreScriptSection(self.handler, dataObj=AnacondaKSScript))
+        self.registerSection(PostScriptSection(self.handler, dataObj=AnacondaKSScript))
+        self.registerSection(TracebackScriptSection(self.handler, dataObj=AnacondaKSScript))
+        self.registerSection(PackageSection(self.handler))
+
 def doKickstart(anaconda):
     storage.storageInitialize(anaconda)
     # Having initialized storage, we can apply all the other kickstart commands.
-- 
1.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]