1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s4/dsdb/tests: py2/py3 compatability replace xrange with range

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power 2018-05-04 12:18:59 +01:00 committed by Andrew Bartlett
parent 9c543376e4
commit 5f330840d0
2 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ delete: otherLoginWorkstations
max_notifications = 5
notifies = [None] * (max_notifications + 1)
for i in xrange(0, max_notifications + 1):
for i in range(0, max_notifications + 1):
notifies[i] = self.ldb.search_iterator(base=self.base_dn,
expression="(objectClass=*)",
scope=ldb.SCOPE_SUBTREE,
@ -172,7 +172,7 @@ delete: otherLoginWorkstations
timeout=1)
num_admin_limit = 0
num_time_limit = 0
for i in xrange(0, max_notifications + 1):
for i in range(0, max_notifications + 1):
try:
for msg in notifies[i]:
continue

View File

@ -2536,7 +2536,7 @@ class SamTests(samba.tests.TestCase):
delete_force(self.ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn)
def find_repl_meta_data(self, rpmd, attid):
for i in xrange(0, rpmd.ctr.count):
for i in range(0, rpmd.ctr.count):
m = rpmd.ctr.array[i]
if m.attid == attid:
return m