mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
Python 2.6 str.format()
compatibility fixes.
This commit is contained in:
parent
95ff8f1a90
commit
797664d9cb
20 changed files with 43 additions and 62 deletions
|
@ -227,7 +227,7 @@ def search_by_attributes(service, **kwargs):
|
|||
# Check if 'list' method support search(look for search parameter):
|
||||
if 'search' in inspect.getargspec(service.list)[0]:
|
||||
res = service.list(
|
||||
search=' and '.join('{}={}'.format(k, v) for k, v in kwargs.items())
|
||||
search=' and '.join('{0}={1}'.format(k, v) for k, v in kwargs.items())
|
||||
)
|
||||
else:
|
||||
res = [
|
||||
|
@ -712,7 +712,7 @@ class BaseModule(object):
|
|||
|
||||
if entity is None:
|
||||
self._module.fail_json(
|
||||
msg="Entity not found, can't run action '{}'.".format(
|
||||
msg="Entity not found, can't run action '{0}'.".format(
|
||||
action
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue