From 442973edc5bffc1e215c22327369f66df7aeec08 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Thu, 28 Jul 2011 14:32:26 -0400 Subject: Clean up existing DN object usage --- install/tools/ipa-server-install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'install') 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 -- cgit