mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-09 09:49:09 -07:00
Migrate basestring to a python3 compatible type (#17199)
This commit is contained in:
parent
a695e18615
commit
a22909c226
28 changed files with 137 additions and 101 deletions
|
@ -24,10 +24,12 @@ __metaclass__ = type
|
|||
import os
|
||||
import sys
|
||||
import ast
|
||||
from ansible.parsing.yaml.loader import AnsibleLoader
|
||||
import traceback
|
||||
|
||||
from collections import MutableMapping, MutableSet, MutableSequence
|
||||
|
||||
from ansible.compat.six import string_types
|
||||
from ansible.parsing.yaml.loader import AnsibleLoader
|
||||
from ansible.plugins import fragment_loader
|
||||
|
||||
try:
|
||||
|
@ -76,7 +78,7 @@ def get_docstring(filename, verbose=False):
|
|||
doc = AnsibleLoader(child.value.s, file_name=filename).get_single_data()
|
||||
fragments = doc.get('extends_documentation_fragment', [])
|
||||
|
||||
if isinstance(fragments, basestring):
|
||||
if isinstance(fragments, string_types):
|
||||
fragments = [ fragments ]
|
||||
|
||||
# Allow the module to specify a var other than DOCUMENTATION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue