Skip to content

Commit e5bac96

Browse files
committed
fix: logger to iflogger
1 parent 232ca65 commit e5bac96

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

nipype/interfaces/base.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@
5252

5353
runtime_profile = str2bool(config.get('execution', 'profile_runtime'))
5454

55-
try:
56-
import psutil
57-
except ImportError as exc:
58-
logger.info('Unable to import packages needed for runtime profiling. '\
59-
'Turning off runtime profiler. Reason: %s' % exc)
60-
runtime_profile = False
61-
6255
nipype_version = LooseVersion(__version__)
6356

6457
iflogger = logging.getLogger('interface')
6558

59+
if runtime_profile:
60+
try:
61+
import psutil
62+
except ImportError as exc:
63+
iflogger.info('Unable to import packages needed for runtime profiling. '\
64+
'Turning off runtime profiler. Reason: %s' % exc)
65+
runtime_profile = False
6666

6767
__docformat__ = 'restructuredtext'
6868

0 commit comments

Comments
 (0)