[PATCH] Add a more robust check for cdrom label (#975375)
Brian C. Lane
bcl at redhat.com
Fri Jun 21 18:45:29 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
---
pyanaconda/ui/gui/spokes/source.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index dbf0be6..23c7cf2 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -578,7 +578,11 @@ class SourceSpoke(NormalSpoke):
@gtk_action_wait
def gtk_action_1():
self._autodetectDeviceLabel.set_text(_("Device: %s") % self._cdrom.name)
- self._autodetectLabel.set_text(_("Label: %s") % (self._cdrom.format.label or ""))
+ if self._cdrom.format and hasattr(self._cdrom.format, "label"):
+ label = self._cdrom.format.label
+ else:
+ label = ""
+ self._autodetectLabel.set_text(_("Label: %s") % label)
gtk_action_1()
added = True
--
1.8.1.4
More information about the anaconda-patches
mailing list