diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-11-30 23:40:01 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-11-30 23:40:01 +0000 |
commit | 09a179673b5827234ba5417f21c6e31a93586183 (patch) | |
tree | 9a6cfa9fba05141541279da439c5446c63d771a9 /iw | |
parent | ab486e0693742474d682612a602cd3504d0d131f (diff) | |
download | anaconda-09a179673b5827234ba5417f21c6e31a93586183.tar.gz anaconda-09a179673b5827234ba5417f21c6e31a93586183.tar.xz anaconda-09a179673b5827234ba5417f21c6e31a93586183.zip |
2004-11-29 Jeremy Katz <katzj@redhat.com>
* iw/zfcp_gui.py: Fix removal and editing of devices to stick (#140559)
Diffstat (limited to 'iw')
-rw-r--r-- | iw/zfcp_gui.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/iw/zfcp_gui.py b/iw/zfcp_gui.py index 947434917..3b930e5b7 100644 --- a/iw/zfcp_gui.py +++ b/iw/zfcp_gui.py @@ -28,8 +28,8 @@ class ZFCPWindow(InstallWindow): InstallWindow.__init__(self, ics) def getNext(self): - self.fcp.updateConfig(self.fcpdevices, self.diskset, self.intf) self.fcp.fcpdevices = self.fcpdevices + self.fcp.updateConfig(self.fcpdevices, self.diskset, self.intf) def setupDevices(self): def sortFcpDevs(one, two): @@ -227,8 +227,16 @@ class ZFCPWindow(InstallWindow): break if invalid == 0: editWin.destroy() + for i in range(0, len(self.fcpdevices)): + if self.fcpdevices[i][0] == devicenum: + break + if (i >= len(self.fcpdevices)): + raise ValueError, "Unable to find device: %s" %(devicenum,) + for t in range(len(self.options)): self.store.set_value(iter, t, tmpvals[t]) + self.fcpdevices[i][t] = tmpvals[t] + break return @@ -242,7 +250,15 @@ class ZFCPWindow(InstallWindow): "configuration. Are you sure that you wish " "to continue?"), type = "yesno") if rc == 1: + devicenum = model.get_value(iter, 0) + for i in range(0, len(self.fcpdevices)): + if self.fcpdevices[i][0] == devicenum: + break + if (i >= len(self.fcpdevices)): + raise ValueError, "Unable to find device: %s" %(devicenum,) + self.fcpdevices.pop(i) self.store.remove(iter) + return # vim:tw=78:ts=4:et:sw=4 |