From 3e491099f8e5fd228db1f844c2b7fb3d038ec0a7 Mon Sep 17 00:00:00 2001 From: Steven Tilley Date: Tue, 8 Oct 2019 10:09:23 -0400 Subject: [PATCH] Allow nipype.cfg in cwd to be read even if ~/.nipype does not exist Fixes a bug where the nipype.cfg in the current directory would not be read if the folder ~/.nipype does not exist. --- nipype/utils/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 219215e0c8..c028ea326f 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -104,9 +104,8 @@ def __init__(self, *args, **kwargs): self._display = None self._resource_monitor = None - if os.path.exists(config_dir): - self._config.read( - [os.path.join(config_dir, 'nipype.cfg'), 'nipype.cfg']) + self._config.read( + [os.path.join(config_dir, 'nipype.cfg'), 'nipype.cfg']) for option in CONFIG_DEPRECATIONS: for section in ['execution', 'logging', 'monitoring']: