1
0
Fork 0
mirror of https://github.com/ansible-collections/ansible.posix.git synced 2026-02-04 08:01:49 +00:00

Fix to follow pylint check in ansible-test-sanity-docker-devel

Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
Hideki Saito 2022-09-07 11:05:24 +09:00
parent 6c0b91a3ee
commit abfe36c62f
4 changed files with 15 additions and 1 deletions

View file

@ -347,6 +347,8 @@ def keyfile(module, user, write=False, path=None, manage_dir=True, follow=False)
basedir = os.path.dirname(keysfile)
if not os.path.exists(basedir):
os.makedirs(basedir)
f = None
try:
f = open(keysfile, "w") # touches file so we can set ownership and perms
finally:

View file

@ -226,7 +226,7 @@ def _escape_fstab(v):
if isinstance(v, int):
return v
else:
return(
return (
v.
replace('\\', '\\134').
replace(' ', '\\040').