Skip to content

Commit

Permalink
correctly convert AnsibleUnsafeText to str (#616)
Browse files Browse the repository at this point in the history
Signed-off-by: NilashishC <[email protected]>
  • Loading branch information
NilashishC authored Jan 12, 2024
1 parent a324b7f commit 257b77e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/module_utils/network/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

from copy import deepcopy
from functools import reduce # forward compatibility for Python 3
from io import StringIO
from itertools import chain

from ansible.module_utils import basic
Expand Down Expand Up @@ -719,7 +720,7 @@ def extract_argspec(doc_obj, argpsec):

# TODO: Support extends_documentation_fragment
def convert_doc_to_ansible_module_kwargs(doc):
doc_obj = yaml.load(str(doc), SafeLoader)
doc_obj = yaml.load(StringIO(doc), SafeLoader)
argspec = {}
spec = {}
extract_argspec(doc_obj, argspec)
Expand Down

0 comments on commit 257b77e

Please sign in to comment.