File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/scout_apm/instruments Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Pending
4+
5+ ### Fixed
6+ - Wrap an import of elasticsearch in a try/except.
7+ ([ Issue 744] ( https://github.com/scoutapp/scout_apm_python/issues/744 ) )
8+
39## [ 2.26.0] 2022-07-27
410
511### Added
Original file line number Diff line number Diff line change 44import logging
55from collections import namedtuple
66
7- import elasticsearch
87import wrapt
98
109from scout_apm .compat import get_pos_args , unwrap_decorators
1110from scout_apm .core .tracked_request import TrackedRequest
1211
1312try :
13+ from elasticsearch import VERSION as ELASTICSEARCH_VERSION
1414 from elasticsearch import Elasticsearch
1515except ImportError : # pragma: no cover
1616 Elasticsearch = None
17+ ELASTICSEARCH_VERSION = (0 , 0 , 0 )
1718
1819try :
1920 # Transport was moved to elastic_transport as of v8.0.0
@@ -100,7 +101,7 @@ def ensure_installed():
100101}
101102
102103CLIENT_METHODS = VERSIONED_CLIENT_METHODS ["v7" ][:]
103- if elasticsearch . VERSION > (8 , 0 , 0 ):
104+ if ELASTICSEARCH_VERSION > (8 , 0 , 0 ):
104105 CLIENT_METHODS += VERSIONED_CLIENT_METHODS ["v8" ]
105106
106107
You can’t perform that action at this time.
0 commit comments