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

Re: [PATCH] Only check for DEVICE_DASD in S390.diskLabelType, not for all platforms.



On 11/23/2009 10:54 PM, Chris Lumens wrote:
---
  platform.py |   10 +++++++---
  1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/platform.py b/platform.py
index 62260da..2a4b9ea 100644
--- a/platform.py
+++ b/platform.py
@@ -141,9 +141,6 @@ class Platform(object):

      def diskLabelType(self, deviceType):
          """Return the disk label type as a parted.DiskType."""
-        if deviceType == parted.DEVICE_DASD:
-            return parted.diskType["dasd"]
-
          return self._diskLabelType

      @property
@@ -441,6 +438,13 @@ class S390(Platform):
      def __init__(self, anaconda):
          Platform.__init__(self, anaconda)

+    def diskLabelType(self, deviceType):
+        """Return the disk label type as a parted.DiskType."""
+        if deviceType == parted.DEVICE_DASD:
+            return parted.diskType["dasd"]
+        else:
+            return Platform.diskLabelType(self, deviceType)
+
  class Sparc(Platform):
      _diskLabelType = parted.diskType["sun"]


Looks good to me.


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