mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 21:52:48 +00:00
use f-strings in module utils (#10901)
* use f-strings in module utils * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * remove unused imports --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
74b6a0294a
commit
b85e263466
51 changed files with 270 additions and 382 deletions
|
|
@ -10,7 +10,7 @@ from ansible.module_utils.common.text.converters import to_native
|
|||
|
||||
class ModuleHelperException(Exception):
|
||||
def __init__(self, msg, update_output=None, *args, **kwargs):
|
||||
self.msg = to_native(msg or "Module failed with exception: {0}".format(self))
|
||||
self.msg = to_native(msg or f"Module failed with exception: {self}")
|
||||
if update_output is None:
|
||||
update_output = {}
|
||||
self.update_output = update_output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue