mirror of https://github.com/ansible/ansible.git
dnf: don't return fail_json['msg'] as list (#65302)
Although it's not enforced that fail_json['msg'] should be a string [1], I think it is pretty strongly implied. In this case the failure_response['msg'] is sent through as the fail_json['msg'], and the trailing commas here turn it into a tuple. It's not clear if this is a typo or intended, but it does cause problems for callbacks that expect this as a string (e.g. [2]). Since there seems no point to having these values as a tuple, remove the trailing commas so they return a string as per everywhere else. [1]pull/66377/head4c589661c2/lib/ansible/module_utils/basic.py (L2078)
[2] https://review.opendev.org/#/c/696081 (cherry picked from commitfc54ae9227
)
parent
e6db6d0d64
commit
b05a2c8a62
@ -0,0 +1,3 @@
|
||||
bugfixes:
|
||||
- dnf module - Ensure the modules exit_json['msg'] response is
|
||||
always string, not sometimes a tuple.
|
Loading…
Reference in New Issue