mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-02 20:24:23 -07:00
Fix #10394 return condition.
This commit is contained in:
parent
bb7588df0b
commit
2078725242
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ class Sysrc(object):
|
|||
if self.value is None:
|
||||
return self.name in conf
|
||||
else:
|
||||
return conf[self.name] == '"%s"' % self.value
|
||||
return self.name in conf and conf[self.name] == '"%s"' % 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