Skip to content

Commit 8f19360

Browse files
committed
fix invocation
1 parent 2910742 commit 8f19360

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.evergreen/scripts/setup_tests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import base64
4+
import io
45
import logging
56
import os
67
import platform
@@ -139,8 +140,9 @@ def setup_libmongocrypt():
139140
LOGGER.info(f"Fetching {url}...")
140141
with request.urlopen(request.Request(url), timeout=15.0) as response: # noqa: S310
141142
if response.status == 200:
142-
with tarfile.open("libmongocrypt.tar.gz", fileobj=response) as fid:
143-
fid.extractall(HERE / "libmongocrypt")
143+
fileobj = io.BytesIO(response.read())
144+
with tarfile.open("libmongocrypt.tar.gz", fileobj=fileobj) as fid:
145+
fid.extractall(Path.cwd() / "libmongocrypt")
144146
LOGGER.info(f"Fetching {url}... done.")
145147

146148
run_command("ls -la libmongocrypt")

0 commit comments

Comments
 (0)