mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-01 09:13:23 +08:00
15 lines
398 B
Python
15 lines
398 B
Python
from importlib import import_module
|
|
|
|
module_names = ('elasticsearch', 'elasticsearch1', 'elasticsearch2', 'elasticsearch5', 'elasticsearch6')
|
|
for module_name in module_names:
|
|
try:
|
|
elasticsearch = import_module(module_name)
|
|
break
|
|
except ImportError:
|
|
pass
|
|
else:
|
|
raise ImportError('could not import any of {0!r}'.format(module_names))
|
|
|
|
|
|
__all__ = ['elasticsearch']
|