@@ -1547,25 +1547,15 @@ def _list_outputs(self):
1547
1547
c .close ()
1548
1548
return None
1549
1549
1550
- class SSHDataGrabberInputSpec (DynamicTraitedSpec , BaseInterfaceInputSpec ):
1550
+ class SSHDataGrabberInputSpec (DataGrabberInputSpec ):
1551
1551
hostname = traits .Str (mandatory = True ,
1552
1552
desc = 'Server hostname.' )
1553
1553
download_files = traits .Bool (True , usedefault = True ,
1554
1554
desc = 'If false it will return the file names without downloading them' )
1555
1555
base_directory = traits .Str (mandatory = True ,
1556
1556
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' )
1566
1557
template_expression = traits .Enum (['fnmatch' , 'regexp' ], usedefault = True ,
1567
1558
desc = 'Use either fnmatch or regexp to express templates' )
1568
-
1569
1559
ssh_log_to_file = traits .Str ('' , usedefault = True ,
1570
1560
desc = 'If set SSH commands will be logged to the given file' )
1571
1561
@@ -1629,7 +1619,7 @@ class SSHDataGrabber(DataGrabber):
1629
1619
"""
1630
1620
input_spec = SSHDataGrabberInputSpec
1631
1621
output_spec = DynamicTraitedSpec
1632
- _always_run = True
1622
+ _always_run = False
1633
1623
1634
1624
def __init__ (self , infields = None , outfields = None , ** kwargs ):
1635
1625
"""
@@ -1644,6 +1634,13 @@ def __init__(self, infields=None, outfields=None, **kwargs):
1644
1634
See class examples for usage
1645
1635
1646
1636
"""
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
+ )
1647
1644
if not outfields :
1648
1645
outfields = ['outfiles' ]
1649
1646
super (SSHDataGrabber , self ).__init__ (** kwargs )
0 commit comments