mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 13:12:46 +00:00
modules p*: use f-strings (#10974)
* modules p*: use f-strings * add changelog frag
This commit is contained in:
parent
d51e4c188b
commit
8120e9347e
42 changed files with 299 additions and 300 deletions
|
|
@ -123,7 +123,7 @@ class PSAdapter(object, metaclass=abc.ABCMeta):
|
|||
try:
|
||||
regex = re.compile(pattern, flags)
|
||||
except re.error as e:
|
||||
raise PSAdapterError("'%s' is not a valid regular expression: %s" % (pattern, to_native(e)))
|
||||
raise PSAdapterError(f"'{pattern}' is not a valid regular expression: {e}")
|
||||
|
||||
return [p.pid for p in self._process_iter(*self.PATTERN_ATTRS) if self._matches_regex(p, regex)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue