rewritten as list literals (#2160) (#2168)

* rewritten as list literals

* added changelog fragment

(cherry picked from commit b97e31dd55)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-04-05 09:50:07 +02:00 committed by GitHub
parent 055c8dac9c
commit 996ef6ab49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 55 additions and 94 deletions

View file

@ -98,9 +98,8 @@ from ansible.module_utils._text import to_native
def get_xattr_keys(module, path, follow):
cmd = [module.get_bin_path('getfattr', True)]
# prevents warning and not sure why it's not default
cmd.append('--absolute-names')
cmd = [module.get_bin_path('getfattr', True), '--absolute-names']
if not follow:
cmd.append('-h')
cmd.append(path)
@ -109,10 +108,8 @@ def get_xattr_keys(module, path, follow):
def get_xattr(module, path, key, follow):
cmd = [module.get_bin_path('getfattr', True), '--absolute-names']
cmd = [module.get_bin_path('getfattr', True)]
# prevents warning and not sure why it's not default
cmd.append('--absolute-names')
if not follow:
cmd.append('-h')
if key is None: