summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/dns.py6
-rw-r--r--python/samba/netcmd/user.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index 8bd6a9bf8a0..a0e92cf8dd9 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -140,7 +140,7 @@ def ip4_array_string(array):
ret = []
if not array:
return ret
- for i in xrange(array.AddrCount):
+ for i in range(array.AddrCount):
addr = inet_ntop(AF_INET, pack('I', array.AddrArray[i]))
ret.append(addr)
return ret
@@ -150,7 +150,7 @@ def dns_addr_array_string(array):
ret = []
if not array:
return ret
- for i in xrange(array.AddrCount):
+ for i in range(array.AddrCount):
if array.AddrArray[i].MaxSa[0] == 0x02:
x = "".join([chr(b) for b in array.AddrArray[i].MaxSa])[4:8]
addr = inet_ntop(AF_INET, x)
@@ -523,7 +523,7 @@ def dns_record_match(dns_conn, server, zone, name, record_type, data):
elif record_type == dnsp.DNS_TYPE_TXT:
if rec.data.count == urec.data.count:
found = True
- for i in xrange(rec.data.count):
+ for i in range(rec.data.count):
found = found and \
(rec.data.str[i].str == urec.data.str[i].str)
diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py
index f849e6ee837..bfe2684e938 100644
--- a/python/samba/netcmd/user.py
+++ b/python/samba/netcmd/user.py
@@ -2027,7 +2027,7 @@ samba-tool user syncpasswords --terminate \\
if self.lockfd != -1:
got_exclusive = False
# Try 5 times to get the exclusiv lock.
- for i in xrange(0, 5):
+ for i in range(0, 5):
try:
fcntl.lockf(self.lockfd, fcntl.LOCK_EX | fcntl.LOCK_NB)
got_exclusive = True