Skip to content

Commit a8b5d03

Browse files
committed
fix: check NO_ET, clarify logic
1 parent dfb10ff commit a8b5d03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fmriprep/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@
7171
from multiprocessing import set_start_method
7272

7373
# Disable NiPype etelemetry always
74-
_nipype_et = os.getenv("NIPYPE_NO_ET")
74+
_disable_et = bool(os.getenv("NO_ET") is not None or os.getenv("NIPYPE_NO_ET") is not None)
7575
os.environ["NIPYPE_NO_ET"] = "1"
76+
os.environ["NO_ET"] = "1"
7677

7778
try:
7879
set_start_method('forkserver')
@@ -115,7 +116,7 @@
115116

116117
# Ping NiPype eTelemetry once if env var was not set
117118
# workers on the pool will have the env variable set from the master process
118-
if _nipype_et is None:
119+
if not _disable_et:
119120
# Just get so analytics track one hit
120121
from contextlib import suppress
121122
from requests import get as _get_url, ConnectionError, ReadTimeout

0 commit comments

Comments
 (0)