mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-01 11:44:24 -07:00
Apply suggestions from code review.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
b0e734a912
commit
cd67a79b2d
2 changed files with 2 additions and 2 deletions
|
@ -1,2 +1,2 @@
|
|||
bugfixes:
|
||||
- "sysrc - use shlex to improve parsing of ``sysrc -e -a`` output (https://github.com/ansible-collections/community.general/issues/10394, https://github.com/ansible-collections/community.general/pull/10400)."
|
||||
- "sysrc - use ``shlex`` to improve parsing of ``sysrc -e -a`` output (https://github.com/ansible-collections/community.general/issues/10394, https://github.com/ansible-collections/community.general/pull/10400)."
|
||||
|
|
|
@ -136,7 +136,7 @@ class Sysrc(object):
|
|||
if self.value is None:
|
||||
return self.name in conf
|
||||
else:
|
||||
return self.name in conf and conf[self.name] == self.value
|
||||
return conf.get(self.name) == self.value
|
||||
|
||||
def contains(self):
|
||||
(rc, out, err) = self.run_sysrc('-n', self.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue