summaryrefslogtreecommitdiff
path: root/lib/ansible/modules
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2022-08-08 13:18:28 -0700
committerGitHub <noreply@github.com>2022-08-08 13:18:28 -0700
commit650befed37eadcaea735673638d5475fa957ca7e (patch)
tree5c5cce3416dc217923b416bdada8a75d931adae3 /lib/ansible/modules
parent04e892757941bf77198692bbe37041d7a8cbf999 (diff)
downloadansible-650befed37eadcaea735673638d5475fa957ca7e.tar.gz
Add missing space after keywords. (#78480)
Also remove unnecessary parenthesis.
Diffstat (limited to 'lib/ansible/modules')
-rw-r--r--lib/ansible/modules/copy.py8
-rw-r--r--lib/ansible/modules/find.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/ansible/modules/copy.py b/lib/ansible/modules/copy.py
index ca6ae0df0e..7fed4a5c8f 100644
--- a/lib/ansible/modules/copy.py
+++ b/lib/ansible/modules/copy.py
@@ -469,7 +469,7 @@ def copy_left_only(src, dest, module):
b_dest_item_path = to_bytes(dest_item_path, errors='surrogate_or_strict')
if os.path.islink(b_src_item_path) and os.path.isdir(b_src_item_path) and local_follow is True:
- shutil.copytree(b_src_item_path, b_dest_item_path, symlinks=not(local_follow))
+ shutil.copytree(b_src_item_path, b_dest_item_path, symlinks=not local_follow)
chown_recursive(b_dest_item_path, module)
if os.path.islink(b_src_item_path) and os.path.isdir(b_src_item_path) and local_follow is False:
@@ -497,7 +497,7 @@ def copy_left_only(src, dest, module):
module.set_group_if_different(b_dest_item_path, group, False)
if not os.path.islink(b_src_item_path) and os.path.isdir(b_src_item_path):
- shutil.copytree(b_src_item_path, b_dest_item_path, symlinks=not(local_follow))
+ shutil.copytree(b_src_item_path, b_dest_item_path, symlinks=not local_follow)
chown_recursive(b_dest_item_path, module)
changed = True
@@ -766,7 +766,7 @@ def main():
b_dest = to_bytes(os.path.join(b_dest, b_basename), errors='surrogate_or_strict')
b_src = to_bytes(os.path.join(module.params['src'], ""), errors='surrogate_or_strict')
if not module.check_mode:
- shutil.copytree(b_src, b_dest, symlinks=not(local_follow))
+ shutil.copytree(b_src, b_dest, symlinks=not local_follow)
chown_recursive(dest, module)
changed = True
@@ -775,7 +775,7 @@ def main():
b_dest = to_bytes(os.path.join(b_dest, b_basename), errors='surrogate_or_strict')
b_src = to_bytes(os.path.join(module.params['src'], ""), errors='surrogate_or_strict')
if not module.check_mode and not os.path.exists(b_dest):
- shutil.copytree(b_src, b_dest, symlinks=not(local_follow))
+ shutil.copytree(b_src, b_dest, symlinks=not local_follow)
changed = True
chown_recursive(dest, module)
if module.check_mode and not os.path.exists(b_dest):
diff --git a/lib/ansible/modules/find.py b/lib/ansible/modules/find.py
index eb9c8aa839..788eb71ded 100644
--- a/lib/ansible/modules/find.py
+++ b/lib/ansible/modules/find.py
@@ -468,7 +468,7 @@ def main():
depth = int(fsname.count(os.path.sep)) - int(wpath.count(os.path.sep)) + 1
if depth > params['depth']:
# Empty the list used by os.walk to avoid traversing deeper unnecessarily
- del(dirs[:])
+ del dirs[:]
continue
if os.path.basename(fsname).startswith('.') and not params['hidden']:
continue