Skip to content

Commit 652c139

Browse files
committed
ENH: Incorporated mwaskom's suggestions
1 parent 303ba30 commit 652c139

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

nipype/interfaces/io.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,25 +1547,15 @@ def _list_outputs(self):
15471547
c.close()
15481548
return None
15491549

1550-
class SSHDataGrabberInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
1550+
class SSHDataGrabberInputSpec(DataGrabberInputSpec):
15511551
hostname = traits.Str(mandatory=True,
15521552
desc='Server hostname.')
15531553
download_files = traits.Bool(True, usedefault=True,
15541554
desc='If false it will return the file names without downloading them')
15551555
base_directory = traits.Str(mandatory=True,
15561556
desc='Path to the base directory consisting of subject data.')
1557-
raise_on_empty = traits.Bool(True, usedefault=True,
1558-
desc='Generate exception if list is empty for a given field')
1559-
sort_filelist = traits.Bool(mandatory=True,
1560-
desc='Sort the filelist that matches the template')
1561-
template = traits.Str(mandatory=True,
1562-
desc='Layout used to get files. relative to base directory if defined')
1563-
template_args = traits.Dict(key_trait=traits.Str,
1564-
value_trait=traits.List(traits.List),
1565-
desc='Information to plug into template')
15661557
template_expression = traits.Enum(['fnmatch', 'regexp'], usedefault=True,
15671558
desc='Use either fnmatch or regexp to express templates')
1568-
15691559
ssh_log_to_file = traits.Str('', usedefault=True,
15701560
desc='If set SSH commands will be logged to the given file')
15711561

@@ -1629,7 +1619,7 @@ class SSHDataGrabber(DataGrabber):
16291619
"""
16301620
input_spec = SSHDataGrabberInputSpec
16311621
output_spec = DynamicTraitedSpec
1632-
_always_run = True
1622+
_always_run = False
16331623

16341624
def __init__(self, infields=None, outfields=None, **kwargs):
16351625
"""
@@ -1644,6 +1634,13 @@ def __init__(self, infields=None, outfields=None, **kwargs):
16441634
See class examples for usage
16451635
16461636
"""
1637+
try:
1638+
paramiko
1639+
except NameError:
1640+
raise ImportError(
1641+
"The library parmiko needs to be installed"
1642+
" for this module to run."
1643+
)
16471644
if not outfields:
16481645
outfields = ['outfiles']
16491646
super(SSHDataGrabber, self).__init__(**kwargs)

0 commit comments

Comments
 (0)