Skip to content

Commit 1db55e3

Browse files
committed
better handling of strings
1 parent 82cce93 commit 1db55e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,9 +1488,9 @@ def _filename_from_source(self, name):
14881488
while isinstance(source, list):
14891489
source = source[0]
14901490
#special treatment for files
1491-
if isinstance(source, str) and os.path.exists(source):
1491+
try:
14921492
_, base, _ = split_filename(source)
1493-
else:
1493+
except AttributeError:
14941494
base = source
14951495
retval = name_template % base
14961496
_, _, ext = split_filename(retval)

0 commit comments

Comments
 (0)