Merge pull request #5066 from hulu/file-shadowing

rename to avoid shadowing built-in type 'file'
This commit is contained in:
Thomas S Hatch 2013-05-16 16:43:07 -07:00
commit 7772c97b8e

View File

@ -90,7 +90,7 @@ def _sync(form, env=None):
salt.utils.fopen(dest, 'r').read()
).hexdigest()
if srch != dsth:
# The downloaded file differes, replace!
# The downloaded file differs, replace!
shutil.copyfile(fn_, dest)
ret.append('{0}.{1}'.format(form, relname))
else:
@ -127,9 +127,9 @@ def _sync(form, env=None):
def _listdir_recursively(rootdir):
file_list = []
for root, dirs, files in os.walk(rootdir):
for file in files:
for filename in files:
relpath = os.path.relpath(root, rootdir).strip('.')
file_list.append(os.path.join(relpath, file))
file_list.append(os.path.join(relpath, filename))
return file_list