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:
Alexei Znamensky
2025-10-11 22:43:43 +13:00
committed by GitHub
parent 74b6a0294a
commit b85e263466
51 changed files with 270 additions and 382 deletions

View File

@@ -12,7 +12,6 @@ try:
except ImportError:
HAS_VEXATAPI = False
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.basic import env_fallback
VXOS_VERSION = None
@@ -58,7 +57,7 @@ def get_array(module):
else:
module.fail_json(msg='Test connection to array failed.')
except Exception as e:
module.fail_json(msg='Vexata API access failed: {0}'.format(to_native(e)))
module.fail_json(msg=f'Vexata API access failed: {e}')
def argument_spec():