summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJohn Dennis <jdennis@redhat.com>2011-07-28 14:32:26 -0400
committerMartin Kosek <mkosek@redhat.com>2011-07-29 13:13:55 +0200
commit442973edc5bffc1e215c22327369f66df7aeec08 (patch)
tree54d4e87c13c107142c937ce81e1c614a5068f87f /install
parent44b3521fad01c860afd84d409af9b2bcb06e1207 (diff)
downloadfreeipa-442973edc5bffc1e215c22327369f66df7aeec08.tar.gz
freeipa-442973edc5bffc1e215c22327369f66df7aeec08.tar.xz
freeipa-442973edc5bffc1e215c22327369f66df7aeec08.zip
Clean up existing DN object usage
Diffstat (limited to 'install')
-rwxr-xr-xinstall/tools/ipa-server-install6
1 files changed, 3 insertions, 3 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index f47741244..564d8a88a 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -89,9 +89,9 @@ def subject_callback(option, opt_str, value, parser):
v = unicode(value, 'utf-8')
try:
dn = DN(v)
- for x in xrange(len(dn)):
- if dn[x][0].attr.lower() not in VALID_SUBJECT_ATTRS:
- raise ValueError('invalid attribute: %s' % dn[x][0].attr.lower())
+ for rdn in dn:
+ if rdn.attr.lower() not in VALID_SUBJECT_ATTRS:
+ raise ValueError('invalid attribute: %s' % rdn.attr)
except ValueError, e:
raise ValueError('Invalid subject base format: %s' % str(e))
parser.values.subject = str(dn) # may as well normalize it