We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 232ca65 commit e5bac96Copy full SHA for e5bac96
nipype/interfaces/base.py
@@ -52,17 +52,17 @@
52
53
runtime_profile = str2bool(config.get('execution', 'profile_runtime'))
54
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
-
62
nipype_version = LooseVersion(__version__)
63
64
iflogger = logging.getLogger('interface')
65
+if runtime_profile:
+ try:
+ import psutil
+ except ImportError as exc:
+ iflogger.info('Unable to import packages needed for runtime profiling. '\
+ 'Turning off runtime profiler. Reason: %s' % exc)
+ runtime_profile = False
66
67
__docformat__ = 'restructuredtext'
68
0 commit comments