summaryrefslogtreecommitdiffstats
path: root/QMTest/TestCmd.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2009-02-08 06:45:39 (GMT)
committerGreg Noel <GregNoel@tigris.org>2009-02-08 06:45:39 (GMT)
commit80722d92812c1276b0d74ca49a21b7351ee74a69 (patch)
treeedfc9cd769a78d95d2a391047cb783032b6d1645 /QMTest/TestCmd.py
parent7d4a9fd9e8e1b6cc955c9cb08ea2d28d4a051052 (diff)
downloadSCons-80722d92812c1276b0d74ca49a21b7351ee74a69.zip
SCons-80722d92812c1276b0d74ca49a21b7351ee74a69.tar.gz
SCons-80722d92812c1276b0d74ca49a21b7351ee74a69.tar.bz2
2to3 sez, "rewrite map() as loop"
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r--QMTest/TestCmd.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index 8b70e4c..4bf1270 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -1335,9 +1335,8 @@ class TestCmd:
do_chmod(top)
def chmod_entries(arg, dirname, names, do_chmod=do_chmod):
- pathnames = map(lambda n, d=dirname: os.path.join(d, n),
- names)
- map(lambda p, do=do_chmod: do(p), pathnames)
+ for n in names:
+ do_chmod(os.path.join(dirname, n))
os.path.walk(top, chmod_entries, None)
else:
@@ -1352,7 +1351,7 @@ class TestCmd:
col = Collector(top)
os.path.walk(top, col, None)
col.entries.reverse()
- map(lambda d, do=do_chmod: do(d), col.entries)
+ for d in col.entries: do_chmod(d)
def writable(self, top, write=1):
"""Make the specified directory tree writable (write == 1)
@@ -1388,7 +1387,7 @@ class TestCmd:
else:
col = Collector(top)
os.path.walk(top, col, None)
- map(lambda d, do=do_chmod: do(d), col.entries)
+ for d in col.entries: do_chmod(d)
def executable(self, top, execute=1):
"""Make the specified directory tree executable (execute == 1)
@@ -1425,9 +1424,8 @@ class TestCmd:
do_chmod(top)
def chmod_entries(arg, dirname, names, do_chmod=do_chmod):
- pathnames = map(lambda n, d=dirname: os.path.join(d, n),
- names)
- map(lambda p, do=do_chmod: do(p), pathnames)
+ for n in names:
+ do_chmod(os.path.join(dirname, n))
os.path.walk(top, chmod_entries, None)
else:
@@ -1442,7 +1440,7 @@ class TestCmd:
col = Collector(top)
os.path.walk(top, col, None)
col.entries.reverse()
- map(lambda d, do=do_chmod: do(d), col.entries)
+ for d in col.entries: do_chmod(d)
def write(self, file, content, mode = 'wb'):
"""Writes the specified content text (second argument) to the