1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-22 19:59:07 +00:00

[stable-10] Avoid six in plugin code (#10873) (#10877)

Avoid six in plugin code (#10873)

Avoid six in plugin code.

(cherry picked from commit 6cd4665412)
This commit is contained in:
Felix Fontein 2025-10-05 07:42:27 +02:00 committed by GitHub
parent 4ab8f79eae
commit 171a028ef8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 80 additions and 130 deletions

View file

@ -137,14 +137,12 @@ 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.six import raise_from
from ansible.module_utils.six.moves.urllib.parse import urlparse
from ansible.plugins.callback import CallbackBase
try:
@ -499,9 +497,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()