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:
parent
ee363db571
commit
9c543376e4
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user