Skip to content

Commit 4d0d309

Browse files
committed
Merge pull request #1086 from demianw/SSHDataGrabberFullPath
SSHDataGrabber outputs now returns full path to the grabbed files
2 parents c1a5ea0 + 9f5eb2c commit 4d0d309

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Next release
5050
* ENH: ANTs JointFusion() (https://github.com/nipy/nipype/pull/1042)
5151
* ENH: Added csvReader() utility (https://github.com/nipy/nipype/pull/1044)
5252
* FIX: typo in nipype.interfaces.freesurfer.utils.py Tkregister2 (https://github.com/nipy/nipype/pull/1083)
53+
* FIX: SSHDataGrabber outputs now return full path to the grabbed/downloaded files. (https://github.com/nipy/nipype/pull/1086)
5354

5455
Release 0.10.0 (October 10, 2014)
5556
============

nipype/interfaces/io.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,13 +1775,20 @@ def _list_outputs(self):
17751775
outputs[key].append(list_to_filename(outfiles))
17761776
if self.inputs.download_files:
17771777
for f in outfiles:
1778-
sftp.get(os.path.join(filledtemplate_dir, f), f)
1778+
try:
1779+
sftp.get(os.path.join(filledtemplate_dir, f), f)
1780+
except IOError:
1781+
iflogger.info('remote file %s not found' % f)
17791782
if any([val is None for val in outputs[key]]):
17801783
outputs[key] = []
17811784
if len(outputs[key]) == 0:
17821785
outputs[key] = None
17831786
elif len(outputs[key]) == 1:
17841787
outputs[key] = outputs[key][0]
1788+
1789+
for k, v in outputs.items():
1790+
outputs[k] = os.path.join(os.getcwd(), v)
1791+
17851792
return outputs
17861793

17871794
def _get_ssh_client(self):

0 commit comments

Comments
 (0)