Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy: pylint fixes and docs #30847

Merged
merged 1 commit into from
Oct 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/ansible/modules/files/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
if the destination does not exist.
type: bool
default: 'yes'
aliases: [ "thirsty" ]
aliases: [ thirsty ]
version_added: "1.1"
directory_mode:
description:
Expand Down Expand Up @@ -88,8 +88,8 @@
- validate
- decrypt
author:
- "Ansible Core Team"
- "Michael DeHaan"
- Ansible Core Team
- Michael DeHaan
notes:
- The M(copy) module recursively copy facility does not scale to lots (>hundreds) of files.
For alternative, see M(synchronize) module, which is a wrapper around C(rsync).
Expand Down Expand Up @@ -252,7 +252,7 @@ def adjust_recursive_directory_permissions(pre_existing_dir, new_directory_list,
Walk the new directories list and make sure that permissions are as we would expect
'''

if len(new_directory_list) > 0:
if new_directory_list:
working_dir = os.path.join(pre_existing_dir, new_directory_list.pop(0))
directory_args['path'] = working_dir
changed = module.set_fs_attributes_if_different(directory_args, changed)
Expand Down