summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/ftpmirror.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-16 15:23:30 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-16 15:23:30 (GMT)
commit8efadf5d6613e76dfc5476f58adb9a2135173129 (patch)
tree93ea7c3914c65801cd3844aa0ea1304676076940 /Tools/scripts/ftpmirror.py
parentd11ae5d6ecda1d233af651a360c9f9140992f05d (diff)
downloadcpython-8efadf5d6613e76dfc5476f58adb9a2135173129.zip
cpython-8efadf5d6613e76dfc5476f58adb9a2135173129.tar.gz
cpython-8efadf5d6613e76dfc5476f58adb9a2135173129.tar.bz2
Ran 2to3 over scripts directory.
Diffstat (limited to 'Tools/scripts/ftpmirror.py')
-rwxr-xr-xTools/scripts/ftpmirror.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/scripts/ftpmirror.py b/Tools/scripts/ftpmirror.py
index dd941a5..b79db1a 100755
--- a/Tools/scripts/ftpmirror.py
+++ b/Tools/scripts/ftpmirror.py
@@ -169,7 +169,7 @@ def mirrorsubdir(f, localdir):
subdirs.append(filename)
continue
filesfound.append(filename)
- if info.has_key(filename) and info[filename] == infostuff:
+ if filename in info and info[filename] == infostuff:
if verbose > 1:
print('Already have this version of',repr(filename))
continue
@@ -178,7 +178,7 @@ def mirrorsubdir(f, localdir):
if interactive:
doit = askabout('file', filename, pwd)
if not doit:
- if not info.has_key(filename):
+ if filename not in info:
info[filename] = 'Not retrieved'
continue
try:
@@ -241,7 +241,7 @@ def mirrorsubdir(f, localdir):
#
# Remove files from info that are no longer remote
deletions = 0
- for filename in info.keys():
+ for filename in list(info.keys()):
if filename not in filesfound:
if verbose:
print("Removing obsolete info entry for", end=' ')
@@ -258,7 +258,7 @@ def mirrorsubdir(f, localdir):
except os.error:
names = []
for name in names:
- if name[0] == '.' or info.has_key(name) or name in subdirs:
+ if name[0] == '.' or name in info or name in subdirs:
continue
skip = 0
for pat in skippats: