mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Avoid six in plugin code (#10873)
Avoid six in plugin code.
(cherry picked from commit 6cd4665412)
This commit is contained in:
@@ -224,13 +224,12 @@ want_proxmox_nodes_ansible_host: true
|
||||
|
||||
import itertools
|
||||
import re
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
from ansible.utils.display import Display
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
@@ -498,7 +497,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
out_val[k] = v
|
||||
value = out_val
|
||||
|
||||
if config not in plaintext_configs and isinstance(value, string_types) \
|
||||
if config not in plaintext_configs and isinstance(value, str) \
|
||||
and all("=" in v for v in value.split(",")):
|
||||
# split off strings with commas to a dict
|
||||
# skip over any keys that cannot be processed
|
||||
|
||||
Reference in New Issue
Block a user