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:
parent
6c0b91a3ee
commit
abfe36c62f
4 changed files with 15 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ def _escape_fstab(v):
|
|||
if isinstance(v, int):
|
||||
return v
|
||||
else:
|
||||
return(
|
||||
return (
|
||||
v.
|
||||
replace('\\', '\\134').
|
||||
replace(' ', '\\040').
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue