mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix nrdp string arguments without an encoding (#3909)
* Fix nrdp string arguments without an encoding * added changelog fragment Signed-off-by: Jesse Harris <zigford@gmail.com> * Update changelogs/fragments/3909-nrdp_fix_string_args_without_encoding.yaml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
00a1152bb1
commit
40ffd559ac
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- nrdp callback plugin - fix error ``string arguments without an encoding`` (https://github.com/ansible-collections/community.general/issues/3903).
|
|
@ -70,6 +70,7 @@ import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||||
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible.module_utils.urls import open_url
|
from ansible.module_utils.urls import open_url
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
|
|
||||||
|
@ -143,7 +144,7 @@ class CallbackModule(CallbackBase):
|
||||||
body = {
|
body = {
|
||||||
'cmd': 'submitcheck',
|
'cmd': 'submitcheck',
|
||||||
'token': self.token,
|
'token': self.token,
|
||||||
'XMLDATA': bytes(xmldata)
|
'XMLDATA': to_bytes(xmldata)
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue