mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #5066 from hulu/file-shadowing
rename to avoid shadowing built-in type 'file'
This commit is contained in:
commit
7772c97b8e
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user