summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2008-11-11 15:50:08 +0100
committerHans de Goede <hdegoede@redhat.com>2008-11-11 22:34:48 +0100
commitfeb6f9f7d508e36c57d9a1bb28727217e28472ef (patch)
treebf4b8cc04c40ae49890468a2c2177814c291b54b /iw
parent2063357f821cd9700ec8c3c932b4a019fec8881e (diff)
downloadanaconda-feb6f9f7d508e36c57d9a1bb28727217e28472ef.tar.gz
anaconda-feb6f9f7d508e36c57d9a1bb28727217e28472ef.tar.xz
anaconda-feb6f9f7d508e36c57d9a1bb28727217e28472ef.zip
iscsi do missing value check only once
Currently the iscsi code checks for giving a password but not a username or vica versa in both the interface and the iscsi code, this patch removes the unneeded check from the interface code, this is a preparation patch for fixing #463156, #461830
Diffstat (limited to 'iw')
-rw-r--r--iw/autopart_type.py28
1 files changed, 6 insertions, 22 deletions
diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index d745a1ee5..33efa5f97 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -273,26 +273,6 @@ class PartitionTypeWindow(InstallWindow):
if len(pw_in) == 0:
pw_in = None
- if user is not None or pw is not None:
- if user is None:
- self.intf.messageWindow(_("Missing value"),
- _("CHAP username is required if CHAP password is defined."))
- continue
- if pw is None:
- self.intf.messageWindow(_("Missing value"),
- _("CHAP password is required if CHAP username is defined."))
- continue
-
- if user_in is not None or pw_in is not None:
- if user_in is None:
- self.intf.messageWindow(_("Missing value"),
- _("Reverse CHAP username is required if reverse CHAP password is defined."))
- continue
- if pw_in is None:
- self.intf.messageWindow(_("Missing value"),
- _("Reverse CHAP password is required if reverse CHAP username is defined."))
- continue
-
err = None
try:
idx = target.rfind(":")
@@ -311,8 +291,12 @@ class PartitionTypeWindow(InstallWindow):
self.intf.messageWindow(_("Error with Data"), "%s" %(err,))
continue
- self.anaconda.id.iscsi.addTarget(ip, port, user, pw, user_in, pw_in,
- self.intf)
+ try:
+ self.anaconda.id.iscsi.addTarget(ip, port, user, pw, user_in, pw_in,
+ self.intf)
+ except ValueError, e:
+ self.intf.messageWindow(_("Error"), str(e))
+ continue
break
dialog.destroy()