Skip to content

Commit b222198

Browse files
committed
Some more fixes
1 parent 43218d6 commit b222198

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

ext/opentelemetry-ext-flask/tests/test_flask_integration.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import unittest
1616

17+
# FIXME Find out why 3 test cases of py37-test-ext-flask fail if I use from
18+
# flask import Flask, request
1719
import flask
1820
from werkzeug.test import Client
1921
from werkzeug.wrappers import BaseResponse

opentelemetry-api/src/opentelemetry/auto_instrument/auto_instrument.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
from distutils.spawn import find_executable
18-
from os import environ, execl
17+
from shutil import which
18+
from os import execl
1919
from os.path import dirname
20-
from sys import argv
20+
from sys import argv, path
2121

2222

2323
def run() -> None:
24-
environ["PYTHONPATH"] = dirname(__file__)
25-
python3 = find_executable(argv[1])
24+
path.insert(0, dirname(__name__))
25+
python3 = which(argv[1])
2626
execl(python3, python3, *argv[2:]) # type: ignore
2727

2828

0 commit comments

Comments
 (0)