1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

python/samba/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:16:38 +01:00 committed by Andrew Bartlett
parent ee363db571
commit 9c543376e4
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ class TestDnsForwarding(DNSTest):
host, str(port), id])
self.subprocesses.append(p)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
for i in xrange(300):
for i in range(300):
time.sleep(0.05)
s.connect((host, port))
try:

View File

@ -121,7 +121,7 @@ class UserCmdTestCase(SambaToolCmdTest):
return
def find_package(packages, name, start_idx=0):
for i in xrange(start_idx, len(packages)):
for i in range(start_idx, len(packages)):
if packages[i].name == name:
return (i, packages[i])
return (None, None)