提交 8b46747c 编写于 作者: J Joerg Jaspert

utils.py

remove a few "FOO shadows builtin" warnings.
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
上级 29201530
......@@ -685,11 +685,11 @@ def regex_safe (s):
# Perform a substition of template
def TemplateSubst(map, filename):
file = open_file(filename)
template = file.read()
templatefile = open_file(filename)
template = templatefile.read()
for x in map.keys():
template = template.replace(x,map[x])
file.close()
templatefile.close()
return template
################################################################################
......@@ -785,13 +785,13 @@ def find_next_free (dest, too_many=100):
################################################################################
def result_join (original, sep = '\t'):
list = []
resultlist = []
for i in xrange(len(original)):
if original[i] == None:
list.append("")
resultlist.append("")
else:
list.append(original[i])
return sep.join(list)
resultlist.append(original[i])
return sep.join(resultlist)
################################################################################
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册