mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +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:
committed by
Andrew Bartlett
parent
9c543376e4
commit
5f330840d0
@ -163,7 +163,7 @@ delete: otherLoginWorkstations
|
|||||||
max_notifications = 5
|
max_notifications = 5
|
||||||
|
|
||||||
notifies = [None] * (max_notifications + 1)
|
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,
|
notifies[i] = self.ldb.search_iterator(base=self.base_dn,
|
||||||
expression="(objectClass=*)",
|
expression="(objectClass=*)",
|
||||||
scope=ldb.SCOPE_SUBTREE,
|
scope=ldb.SCOPE_SUBTREE,
|
||||||
@ -172,7 +172,7 @@ delete: otherLoginWorkstations
|
|||||||
timeout=1)
|
timeout=1)
|
||||||
num_admin_limit = 0
|
num_admin_limit = 0
|
||||||
num_time_limit = 0
|
num_time_limit = 0
|
||||||
for i in xrange(0, max_notifications + 1):
|
for i in range(0, max_notifications + 1):
|
||||||
try:
|
try:
|
||||||
for msg in notifies[i]:
|
for msg in notifies[i]:
|
||||||
continue
|
continue
|
||||||
|
@ -2536,7 +2536,7 @@ class SamTests(samba.tests.TestCase):
|
|||||||
delete_force(self.ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn)
|
delete_force(self.ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn)
|
||||||
|
|
||||||
def find_repl_meta_data(self, rpmd, attid):
|
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]
|
m = rpmd.ctr.array[i]
|
||||||
if m.attid == attid:
|
if m.attid == attid:
|
||||||
return m
|
return m
|
||||||
|
Reference in New Issue
Block a user