Skip to content

Commit 7fbd869

Browse files
committed
fix error accessing config.has_option
1 parent ac19d23 commit 7fbd869

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

nipype/utils/config.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ def __init__(self, *args, **kwargs):
9898
self._config.read([config_file, 'nipype.cfg'])
9999

100100
for option in CONFIG_DEPRECATIONS:
101-
if self._config.has_option(option):
102-
new_option = CONFIG_DEPRECATIONS[option][0]
103-
if not self._config.has_option(new_option):
104-
# Warn implicit in get
105-
self._config.set(new_option, self._config.get(option))
101+
for section in ['execution', 'logging']:
102+
if self._config.has_option(section, option):
103+
new_option = CONFIG_DEPRECATIONS[option][0]
104+
if not self._config.has_option(section, new_option):
105+
# Warn implicit in get
106+
self._config.set(section, new_option,
107+
self._config.get(option))
106108

107109
def set_default_config(self):
108110
self._config.readfp(StringIO(default_cfg))

0 commit comments

Comments
 (0)