mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
[PR #10688/ceba0cbe backport][stable-10] pids: avoid type error if name is empty (#10691)
pids: avoid type error if name is empty (#10688)
Avoid type error if name is empty.
(cherry picked from commit ceba0cbedb
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
ce05de750e
commit
6d94f0acbe
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/10688-pids.yml
Normal file
2
changelogs/fragments/10688-pids.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "pids - prevent error when an empty string is provided for ``name`` (https://github.com/ansible-collections/community.general/issues/10672, https://github.com/ansible-collections/community.general/pull/10688)."
|
|
@ -195,7 +195,7 @@ class Pids(object):
|
|||
self._pids = []
|
||||
|
||||
def execute(self):
|
||||
if self._name:
|
||||
if self._name is not None:
|
||||
self._pids = self._ps.get_pids_by_name(self._name)
|
||||
else:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue