Avoid six in plugin code (#10873)

Avoid six in plugin code.
This commit is contained in:
Felix Fontein 2025-10-05 06:56:32 +02:00 committed by GitHub
commit 6cd4665412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 70 additions and 120 deletions

View file

@ -135,7 +135,6 @@ import socket
from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
from ansible.module_utils.six import text_type
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
@ -264,7 +263,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
self.cobbler = xmlrpc_client.Server(self.cobbler_url, allow_none=True)
self.token = None
if self.get_option('user') is not None:
self.token = self.cobbler.login(text_type(self.get_option('user')), text_type(self.get_option('password')))
self.token = self.cobbler.login(str(self.get_option('user')), str(self.get_option('password')))
self.cache_key = self.get_cache_key(path)
self.use_cache = cache and self.get_option('cache')