summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2010-01-25 15:49:42 -0500
committerPeter Jones <pjones@redhat.com>2010-02-26 12:58:34 -0500
commit8a4fdd59c1d0d613cb32778b7142da8ec0adbab1 (patch)
tree969eadddae569debc408c79c5740c1bc71d28be0
parentc69b38827091b64c7091e415c6596a7045fd5039 (diff)
downloadanaconda-8a4fdd59c1d0d613cb32778b7142da8ec0adbab1.tar.gz
anaconda-8a4fdd59c1d0d613cb32778b7142da8ec0adbab1.tar.xz
anaconda-8a4fdd59c1d0d613cb32778b7142da8ec0adbab1.zip
Add StorageDevice.serial_for_display
Sometimes we need to compare serials, and sometimes we need to display them. The two aren't necessarily the same thing, so add a function to differentiate them.
-rw-r--r--iw/cleardisks_gui.py1
-rw-r--r--storage/devices.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/iw/cleardisks_gui.py b/iw/cleardisks_gui.py
index 6b1c2e258..f97acf143 100644
--- a/iw/cleardisks_gui.py
+++ b/iw/cleardisks_gui.py
@@ -160,6 +160,7 @@ class ClearDisksWindow (InstallWindow):
d.model,
str(int(d.size)) + " MB",
d.vendor, "", d.serial))
+ d.vendor, "", d.serial_for_display))
self.addButton.connect("clicked", self._add_clicked)
self.removeButton.connect("clicked", self._remove_clicked)
diff --git a/storage/devices.py b/storage/devices.py
index 604eec469..898273040 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -754,6 +754,10 @@ class StorageDevice(Device):
return self._serial
@property
+ def serial_for_display(self):
+ return self.serial
+
+ @property
def model(self):
if not self._model:
self._model = getattr(self.partedDevice, "model", "")
@@ -3055,6 +3059,8 @@ class MultipathDevice(DMDevice):
return self._getWwidFromSerial(self._serial)
@property
+ def serial_for_display(self):
+ return self.wwid
@property
def model(self):