mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
More 2to3 fixes in the Tools directory. Fixes #2893.
This commit is contained in:
parent
acbca71ea7
commit
bf82e374ee
38 changed files with 1999 additions and 2032 deletions
|
@ -18,7 +18,7 @@ def checkextensions(unknown, extensions):
|
|||
for mod in unknown:
|
||||
for e in extensions:
|
||||
(mods, vars), liba = edict[e]
|
||||
if not mods.has_key(mod):
|
||||
if mod not in mods:
|
||||
continue
|
||||
modules.append(mod)
|
||||
if liba:
|
||||
|
@ -28,7 +28,7 @@ def checkextensions(unknown, extensions):
|
|||
if liba in files:
|
||||
break
|
||||
files.append(liba)
|
||||
for m in mods.keys():
|
||||
for m in list(mods.keys()):
|
||||
files = files + select(e, mods, vars,
|
||||
m, 1)
|
||||
break
|
||||
|
@ -84,7 +84,7 @@ def expandvars(str, vars):
|
|||
break
|
||||
var = str[i:j]
|
||||
i = j+1
|
||||
if vars.has_key(var):
|
||||
if var in vars:
|
||||
str = str[:k] + vars[var] + str[i:]
|
||||
i = k
|
||||
return str
|
||||
|
|
|
@ -460,7 +460,7 @@ def main():
|
|||
somevars = {}
|
||||
if os.path.exists(makefile_in):
|
||||
makevars = parsesetup.getmakevars(makefile_in)
|
||||
for key in makevars.keys():
|
||||
for key in makevars:
|
||||
somevars[key] = makevars[key]
|
||||
|
||||
somevars['CFLAGS'] = ' '.join(cflags) # override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue