Skip to content

Commit 7646796

Browse files
committed
use a class field limit rerunning check
1 parent 9c5d64b commit 7646796

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

nipype/interfaces/base/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,14 @@ class BaseInterface(Interface):
166166
_redirect_x = False
167167
references_ = []
168168
resource_monitor = True # Enabled for this interface IFF enabled in the config
169+
check_version = None
169170

170171
def __init__(self, from_file=None, resource_monitor=None,
171172
ignore_exception=False, **inputs):
172173
if config.getboolean('execution', 'check_version'):
173174
from ... import check_latest_version
174-
check_latest_version()
175+
if BaseInterface.check_version is None:
176+
BaseInterface.check_version = check_latest_version()
175177

176178
if not self.input_spec:
177179
raise Exception(

nipype/pipeline/engine/base.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ def __init__(self, name=None, base_dir=None):
4141

4242
self.base_dir = base_dir
4343
self.config = deepcopy(config._sections)
44-
if config.getboolean('execution', 'check_version'):
45-
from ... import check_latest_version
46-
check_latest_version()
4744

4845
@property
4946
def name(self):

0 commit comments

Comments
 (0)