diff options
author | Martin Basti <mbasti@redhat.com> | 2016-03-20 20:54:26 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-03-22 10:20:51 +0100 |
commit | 195e50b93b63e4f30ce83dbcfef278727d48aea2 (patch) | |
tree | 17fe09843b3d2b76f73052f6dd0f9843c7c23325 /ipaserver | |
parent | d46cd5d956d1c03b863bf90d0fd0ff4870448183 (diff) | |
download | freeipa-195e50b93b63e4f30ce83dbcfef278727d48aea2.tar.gz freeipa-195e50b93b63e4f30ce83dbcfef278727d48aea2.tar.xz freeipa-195e50b93b63e4f30ce83dbcfef278727d48aea2.zip |
Pylint: use list comprehension instead of iteration
Iteration over indexes without calling enumeration fuction is not pythonic and should not be used.
In this case iteration can be replaced by list comprehension. Fixing this allows to enable
pylint consider-using-enumerate check.
Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/dcerpc.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py index 6b62b5fea..a93e8ddb2 100644 --- a/ipaserver/dcerpc.py +++ b/ipaserver/dcerpc.py @@ -784,11 +784,8 @@ class DomainValidator(object): return info def string_to_array(what): - blob = [0] * len(what) + return [ord(v) for v in what] - for i in range(len(what)): - blob[i] = ord(what[i]) - return blob class TrustDomainInstance(object): |