mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
remove trailing whitespaces
This commit is contained in:
parent
7f8505d693
commit
9ce933f7d0
2 changed files with 4 additions and 3 deletions
|
|
@ -6,5 +6,6 @@
|
||||||
skip_list:
|
skip_list:
|
||||||
- meta-runtime[unsupported-version] # Tis rule doesn't make any sense
|
- meta-runtime[unsupported-version] # Tis rule doesn't make any sense
|
||||||
- fqcn[deep] # This rule produces false positives for files in tests/unit/plugins/action/fixtures/
|
- fqcn[deep] # This rule produces false positives for files in tests/unit/plugins/action/fixtures/
|
||||||
|
- no-relative-paths # Temporary skip due to documentation parsing issue
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
- changelogs/
|
- changelogs/
|
||||||
|
|
|
||||||
|
|
@ -404,14 +404,14 @@ class SysctlModule(object):
|
||||||
def read_system_wide_sysctl_files(self):
|
def read_system_wide_sysctl_files(self):
|
||||||
"""Read all system-wide sysctl configuration files when system_wide=True"""
|
"""Read all system-wide sysctl configuration files when system_wide=True"""
|
||||||
system_values = {}
|
system_values = {}
|
||||||
|
|
||||||
for sysctl_pattern in self.SYSCTL_DIRS:
|
for sysctl_pattern in self.SYSCTL_DIRS:
|
||||||
for conf_file in glob.glob(sysctl_pattern):
|
for conf_file in glob.glob(sysctl_pattern):
|
||||||
if os.path.isfile(conf_file):
|
if os.path.isfile(conf_file):
|
||||||
try:
|
try:
|
||||||
with open(conf_file, "r") as read_file:
|
with open(conf_file, "r") as read_file:
|
||||||
lines = read_file.readlines()
|
lines = read_file.readlines()
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
# don't split empty lines or comments or line without equal sign
|
# don't split empty lines or comments or line without equal sign
|
||||||
|
|
@ -426,7 +426,7 @@ class SysctlModule(object):
|
||||||
except IOError:
|
except IOError:
|
||||||
# Skip files that can't be read
|
# Skip files that can't be read
|
||||||
continue
|
continue
|
||||||
|
|
||||||
return system_values
|
return system_values
|
||||||
|
|
||||||
# Fix the value in the sysctl file content
|
# Fix the value in the sysctl file content
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue