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:
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)
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)
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:
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
# result.append(s)
build_source(node.all_children(), sources)
- # now strip the build_node from the sources by calling the srcnode
- # function
- def get_final_srcnode(file):
- srcnode = file.srcnode()
- while srcnode != file.srcnode():
- srcnode = file.srcnode()
- return srcnode
-
- # get the final srcnode for all nodes, this means stripping any
- # attached build node.
- map( get_final_srcnode, sources )
+ # THIS CODE APPEARS TO HAVE NO EFFECT
+ # # get the final srcnode for all nodes, this means stripping any
+ # # attached build node by calling the srcnode function
+ # for file in sources:
+ # srcnode = file.srcnode()
+ # while srcnode != file.srcnode():
+ # srcnode = file.srcnode()
# remove duplicates
return list(set(sources))
if not strings:
# Make sure the working directory (self) actually has
# entries for all Nodes in repositories or variant dirs.
- map(selfEntry, node_names)
+ for name in node_names: selfEntry(name)
if ondisk:
try:
disk_names = os.listdir(dir.abspath)
args,varargs,varkw,defaults=getargspec(packager.package)
if defaults!=None:
args=args[:-len(defaults)] # throw away arguments with default values
- map(args.remove, 'env target source'.split())
+ args.remove('env')
+ args.remove('target')
+ args.remove('source')
# now remove any args for which we have a value in kw.
#args=[x for x in args if not kw.has_key(x)]
args=filter(lambda x, kw=kw: not kw.has_key(x), args)
if children:
margin.append(1)
- map(lambda C, cf=child_func, p=prune, i=IDX(showtags), m=margin, v=visited:
- print_tree(C, cf, p, i, m, v),
- children[:-1])
+ idx = IDX(showtags)
+ for C in children[:-1]:
+ print_tree(C, child_func, prune, idx, margin, visited)
margin[-1] = 0
- print_tree(children[-1], child_func, prune, IDX(showtags), margin, visited)
+ print_tree(children[-1], child_func, prune, idx, margin, visited)
margin.pop()