summaryrefslogtreecommitdiffstats
path: root/ipalib/parameters.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/parameters.py')
-rw-r--r--ipalib/parameters.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index b81e515c3..5b21cfb23 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -1475,12 +1475,12 @@ class IA5Str(Str):
def _convert_scalar(self, value, index=None):
if isinstance(value, six.string_types):
- for i in xrange(len(value)):
- if ord(value[i]) > 127:
+ for char in value:
+ if ord(char) > 127:
raise ConversionError(name=self.get_param_name(),
index=index,
error=_('The character %(char)r is not allowed.') %
- dict(char=value[i],)
+ dict(char=char,)
)
return super(IA5Str, self)._convert_scalar(value, index)