Skip to content

Commit ebe5805

Browse files
authored
fix: Make GET_VERSION_TIMEOUT settable via env vars (#22)
* Make GET_VERSION_TIMEOUT settable by env vars * Make GET_VERSION_TIMEOUT a global * remove ,
1 parent 4a95cde commit ebe5805

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/findpython/python.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import dataclasses as dc
44
import logging
5+
import os
56
import subprocess
67
from functools import lru_cache
78
from pathlib import Path
@@ -11,7 +12,7 @@
1112
from findpython.utils import get_binary_hash
1213

1314
logger = logging.getLogger("findpython")
14-
GET_VERSION_TIMEOUT = 5
15+
GET_VERSION_TIMEOUT = float(os.environ.get("FINDPYTHON_GET_VERSION_TIMEOUT", 5))
1516

1617

1718
@lru_cache(maxsize=1024)

0 commit comments

Comments
 (0)