We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 050b122 commit 8b604f5Copy full SHA for 8b604f5
plugins/modules/dcnm_policy.py
@@ -524,10 +524,9 @@ def dcnm_policy_validate_input(self):
524
clist, policy_spec
525
)
526
if invalid_params:
527
- mesg = 'Invalid parameters in playbook: while processing policy "{0}", Error: {1}'.format(
528
- cfg["name"], invalid_params
529
- )
530
- self.module.fail_json(msg=mesg)
+ policy_name = cfg.get("name", "unknown")
+ msg = f"Invalid parameters in playbook: while processing policy {policy_name}, Error: {invalid_params}"
+ self.module.fail_json(msg=msg)
531
if self.use_desc_as_key:
532
# Fail the module when use_desc_as_key is True but description is not given or empty
533
if cfg.get("description", "") == "":
0 commit comments