[PATCH] kickstart.py: Fix undefined reference to handler

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

 



Instead of using self.handler, which is not defined for
BaseData derived classes, always use anaconda.id.ksdata in the execute()
method of pykickstart command/data derived classes.
---
 kickstart.py |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index b6cd095..2b4d079 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -198,7 +198,7 @@ class AutoPart(commands.autopart.F12_AutoPart):
             anaconda.id.storage.autoPartAddBackupPassphrase = \
                 self.backuppassphrase
 
-        self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+        anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
 
 class AutoStep(commands.autostep.FC3_AutoStep):
     def execute(self, anaconda):
@@ -299,7 +299,7 @@ class ClearPart(commands.clearpart.FC3_ClearPart):
             anaconda.id.storage.reinitializeDisks = self.initAll
 
         clearPartitions(anaconda.id.storage)
-        self.handler.skipSteps.append("cleardiskssel")
+        anaconda.ksdata.skipSteps.append("cleardiskssel")
 
 class Fcoe(commands.fcoe.F13_Fcoe):
     def parse(self, args):
@@ -357,7 +357,7 @@ class IgnoreDisk(commands.ignoredisk.F8_IgnoreDisk):
     def execute(self, anaconda):
         anaconda.id.storage.ignoredDisks = self.ignoredisk
         anaconda.id.storage.exclusiveDisks = self.onlyuse
-        self.handler.skipSteps.extend(["filter", "filtertype"])
+        anaconda.ksdata.skipSteps.extend(["filter", "filtertype"])
 
 class Iscsi(commands.iscsi.F10_Iscsi):
     def parse(self, args):
@@ -383,13 +383,13 @@ class Keyboard(commands.keyboard.FC3_Keyboard):
     def execute(self, anaconda):
         anaconda.id.keyboard.set(self.keyboard)
         anaconda.id.keyboard.beenset = 1
-        self.handler.skipSteps.append("keyboard")
+        anaconda.ksdata.skipSteps.append("keyboard")
 
 class Lang(commands.lang.FC3_Lang):
     def execute(self, anaconda):
         anaconda.id.instLanguage.instLang = self.lang
         anaconda.id.instLanguage.systemLang = self.lang
-        self.handler.skipSteps.append("language")
+        anaconda.ksdata.skipSteps.append("language")
 
 class LogVolData(commands.logvol.F12_LogVolData):
     def execute(self, anaconda):
@@ -431,7 +431,7 @@ class LogVolData(commands.logvol.F12_LogVolData):
 
             dev.format.mountpoint = self.mountpoint
             dev.format.mountopts = self.fsopts
-            self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+            anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
             return
 
         # Make sure this LV name is not already used in the requested VG.
@@ -512,7 +512,7 @@ class LogVolData(commands.logvol.F12_LogVolData):
                                      parents=request)
             storage.createDevice(luksdev)
 
-        self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+        anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
 
 class Logging(commands.logging.FC6_Logging):
     def execute(self, anaconda):
@@ -672,7 +672,7 @@ class PartitionData(commands.partition.F12_PartData):
 
             dev.format.mountpoint = self.mountpoint
             dev.format.mountopts = self.fsopts
-            self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+            anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
             return
 
         # Size specification checks.
@@ -761,11 +761,11 @@ class PartitionData(commands.partition.F12_PartData):
                                      parents=request)
             storage.createDevice(luksdev)
 
-        self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+        anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
 
 class Reboot(commands.reboot.FC6_Reboot):
     def execute(self, anaconda):
-        self.handler.skipSteps.append("complete")
+        anaconda.ksdata.skipSteps.append("complete")
 
 class RaidData(commands.raid.F12_RaidData):
     def execute(self, anaconda):
@@ -814,7 +814,7 @@ class RaidData(commands.raid.F12_RaidData):
 
             dev.format.mountpoint = self.mountpoint
             dev.format.mountopts = self.fsopts
-            self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+            anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
             return
 
         # Get a list of all the RAID members.
@@ -900,14 +900,14 @@ class RaidData(commands.raid.F12_RaidData):
                                      parents=request)
             storage.createDevice(luksdev)
 
-        self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
+        anaconda.ksdata.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
 
 class RootPw(commands.rootpw.F8_RootPw):
     def execute(self, anaconda):
         anaconda.id.rootPassword["password"] = self.password
         anaconda.id.rootPassword["isCrypted"] = self.isCrypted
         anaconda.id.rootPassword["lock"] = self.lock
-        self.handler.skipSteps.append("accounts")
+        anaconda.ksdata.skipSteps.append("accounts")
 
 class SELinux(commands.selinux.FC3_SELinux):
     def execute(self, anaconda):
@@ -915,7 +915,7 @@ class SELinux(commands.selinux.FC3_SELinux):
 
 class SkipX(commands.skipx.FC3_SkipX):
     def execute(self, anaconda):
-        self.handler.skipSteps.extend(["setsanex", "videocard", "xcustom"])
+        anaconda.ksdata.skipSteps.extend(["setsanex", "videocard", "xcustom"])
 
         if anaconda.id.desktop is not None:
             anaconda.id.desktop.setDefaultRunLevel(3)
@@ -929,7 +929,7 @@ class Timezone(commands.timezone.FC6_Timezone):
             log.warning("Timezone %s set in kickstart is not valid." % (self.timezone,))
 
         anaconda.id.timezone.setTimezoneInfo(self.timezone, self.isUtc)
-        self.handler.skipSteps.append("timezone")
+        anaconda.ksdata.skipSteps.append("timezone")
 
 class Upgrade(commands.upgrade.F11_Upgrade):
     def execute(self, anaconda):
-- 
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux