diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-08-12 15:23:56 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-09-01 11:42:01 +0200 |
commit | 5178e9a5975b17683a2529f6cf4c903766d234d9 (patch) | |
tree | d51ad5a191cf5129024d182b9e5a1d2518151284 /ipatests/test_ipapython | |
parent | 9e917cae39e266fb3092e5ab212a99968de996c2 (diff) | |
download | freeipa-5178e9a5975b17683a2529f6cf4c903766d234d9.tar.gz freeipa-5178e9a5975b17683a2529f6cf4c903766d234d9.tar.xz freeipa-5178e9a5975b17683a2529f6cf4c903766d234d9.zip |
Modernize use of range()
In Python 3, range() behaves like the old xrange().
The difference between range() and xrange() is usually not significant,
especially if the whole result is iterated over.
Convert xrange() usage to range() for small ranges.
Use modern idioms in a few other uses of range().
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipatests/test_ipapython')
-rw-r--r-- | ipatests/test_ipapython/test_keyring.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipatests/test_ipapython/test_keyring.py b/ipatests/test_ipapython/test_keyring.py index bd876ea77..9a5fc98ea 100644 --- a/ipatests/test_ipapython/test_keyring.py +++ b/ipatests/test_ipapython/test_keyring.py @@ -89,7 +89,7 @@ class test_keyring(object): assert(result == UPDATE_VALUE) # Now update it 10 times - for i in xrange(10): + for i in range(10): kernel_keyring.update_key(TEST_KEY, 'test %d' % i) result = kernel_keyring.read_key(TEST_KEY) assert(result == 'test %d' % i) |