[master/f20/rhel7] use deepcopy on ksdata method (#1028243)

Brian C. Lane bcl at redhat.com
Tue Nov 12 01:45:43 UTC 2013


From: "Brian C. Lane" <bcl at redhat.com>

Once the method was changed it was blowing up while trying to clean up
the iso usage. This also resets the iso state and button when switching
to another method.
---
 pyanaconda/ui/gui/spokes/source.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index e93e313..3ffa7ee 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -313,7 +313,7 @@ class SourceSpoke(NormalSpoke):
         """
         import copy
 
-        old_source = copy.copy(self.data.method)
+        old_source = copy.deepcopy(self.data.method)
 
         if self._autodetectButton.get_active():
             if not self._cdrom:
@@ -414,6 +414,10 @@ class SourceSpoke(NormalSpoke):
         # If the user moved from an HDISO method to some other, we need to
         # clear the protected bit on that device.
         if old_source.method == "harddrive" and old_source.partition:
+            self._currentIsoFile = None
+            self._isoChooserButton.set_label(self._origIsoChooserButton)
+            self._isoChooserButton.set_use_underline(True)
+
             if old_source.partition in self.storage.config.protectedDevSpecs:
                 self.storage.config.protectedDevSpecs.remove(old_source.partition)
 
@@ -536,6 +540,7 @@ class SourceSpoke(NormalSpoke):
         self._urlEntry = self.builder.get_object("urlEntry")
         self._protocolComboBox = self.builder.get_object("protocolComboBox")
         self._isoChooserButton = self.builder.get_object("isoChooserButton")
+        self._origIsoChooserButton = self._isoChooserButton.get_label()
 
         self._mirrorlistCheckbox = self.builder.get_object("mirrorlistCheckbox")
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list