[PR #9490/1e28302a backport][stable-9] htpasswd: let changed reflect updated permissions (#9492)

htpasswd: let changed reflect updated permissions (#9490)

* Let changed reflect updated permissions.

* Make pylint happy.

(cherry picked from commit 1e28302a66)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2024-12-31 10:28:53 +01:00 committed by GitHub
parent ae8015667c
commit c7773afebf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 1 deletions

View file

@ -243,8 +243,9 @@ def main():
(msg, changed) = absent(path, username, check_mode)
else:
module.fail_json(msg="Invalid state: %s" % state)
return # needed to make pylint happy
check_file_attrs(module, changed, msg)
(msg, changed) = check_file_attrs(module, changed, msg)
module.exit_json(msg=msg, changed=changed)
except Exception as e:
module.fail_json(msg=to_native(e))