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

@ -137,15 +137,13 @@ import json
import os
import socket
import uuid
from time import time_ns
from collections import OrderedDict
from os.path import basename
from time import time_ns
from urllib.parse import urlparse
from ansible.errors import AnsibleError
from ansible.module_utils.ansible_release import __version__ as ansible_version
from ansible.module_utils.six import raise_from
from ansible.module_utils.six.moves.urllib.parse import urlparse
from ansible.plugins.callback import CallbackBase
try:
@ -495,9 +493,9 @@ class CallbackModule(CallbackBase):
self.otel_exporter_otlp_traces_protocol = None
if OTEL_LIBRARY_IMPORT_ERROR:
raise_from(
AnsibleError('The `opentelemetry-api`, `opentelemetry-exporter-otlp` or `opentelemetry-sdk` must be installed to use this plugin'),
OTEL_LIBRARY_IMPORT_ERROR)
raise AnsibleError(
'The `opentelemetry-api`, `opentelemetry-exporter-otlp` or `opentelemetry-sdk` must be installed to use this plugin'
) from OTEL_LIBRARY_IMPORT_ERROR
self.tasks_data = OrderedDict()