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

Re: [PATCH master] Make bootLoaderInfo new-style class, so that its properties work correctly.



Looks ok,

Regards,

Hans


On 10/13/2009 04:37 PM, Radek Vykydal wrote:
Be bootLoaderInfo old-style class, setting of its property drivelist doesn't
work, instead the property is overwritten with attribute and therefore for
example any following calls of updateDriveList have no effect.

AFAIK it doesn't cause problems anywhere at the moment, but I think it should
be fixed it in master.
---
  booty/alpha.py          |    3 ++-
  booty/bootloaderInfo.py |    2 +-
  booty/ppc.py            |    3 ++-
  booty/s390.py           |    3 ++-
  4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/booty/alpha.py b/booty/alpha.py
index c4a3360..da9f839 100644
--- a/booty/alpha.py
+++ b/booty/alpha.py
@@ -145,7 +145,8 @@ class alphaBootloaderInfo(bootloaderInfo):
      def __init__(self, instData):
          bootloaderInfo.__init__(self, instData)
          self.useGrubVal = 0
-        self.configfile = "/etc/aboot.conf"
+        self._configdir = "/etc"
+        self._configname = "aboot.conf"
          # self.kernelLocation is already set to what we need.
          self.password = None
          self.pure = None
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index 4919cf3..ccde6be 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -268,7 +268,7 @@ class BootImages:
          retval.sort()
          return retval

-class bootloaderInfo:
+class bootloaderInfo(object):
      def getConfigFileName(self):
          if not self._configname:
              raise NotImplementedError
diff --git a/booty/ppc.py b/booty/ppc.py
index 9e43090..e19e5d6 100644
--- a/booty/ppc.py
+++ b/booty/ppc.py
@@ -178,4 +178,5 @@ class ppcBootloaderInfo(bootloaderInfo):
          bootloaderInfo.__init__(self, instData)
          self.useYabootVal = 1
          self.kernelLocation = "/boot"
-        self.configfile = "/etc/yaboot.conf"
+        self._configdir = "/etc"
+        self._configname = "yaboot.conf"
diff --git a/booty/s390.py b/booty/s390.py
index 39a57d4..84feb6b 100644
--- a/booty/s390.py
+++ b/booty/s390.py
@@ -174,4 +174,5 @@ class s390BootloaderInfo(bootloaderInfo):
          bootloaderInfo.__init__(self, instData)
          self.useZiplVal = 1      # only used on s390
          self.kernelLocation = "/boot/"
-        self.configfile = "/etc/zipl.conf"
+        self._configdir = "/etc"
+        self._configname = "zipl.conf"


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