3030
3131import sqlite3
3232from nipype .utils .misc import human_order_sorted
33+ from nipype .external import six
3334
3435try :
3536 import pyxnat
@@ -520,7 +521,7 @@ def _list_outputs(self):
520521 for argnum , arglist in enumerate (args ):
521522 maxlen = 1
522523 for arg in arglist :
523- if isinstance (arg , basestring ) and hasattr (self .inputs , arg ):
524+ if isinstance (arg , six . string_types ) and hasattr (self .inputs , arg ):
524525 arg = getattr (self .inputs , arg )
525526 if isinstance (arg , list ):
526527 if (maxlen > 1 ) and (len (arg ) != maxlen ):
@@ -531,7 +532,7 @@ def _list_outputs(self):
531532 for i in range (maxlen ):
532533 argtuple = []
533534 for arg in arglist :
534- if isinstance (arg , basestring ) and hasattr (self .inputs , arg ):
535+ if isinstance (arg , six . string_types ) and hasattr (self .inputs , arg ):
535536 arg = getattr (self .inputs , arg )
536537 if isinstance (arg , list ):
537538 argtuple .append (arg [i ])
@@ -786,7 +787,7 @@ def _match_path(self, target_path):
786787
787788 def _run_interface (self , runtime ):
788789 #Prepare some of the inputs
789- if isinstance (self .inputs .root_paths , basestring ):
790+ if isinstance (self .inputs .root_paths , six . string_types ):
790791 self .inputs .root_paths = [self .inputs .root_paths ]
791792 self .match_regex = re .compile (self .inputs .match_regex )
792793 if self .inputs .max_depth is Undefined :
@@ -1155,7 +1156,7 @@ def _list_outputs(self):
11551156 for argnum , arglist in enumerate (args ):
11561157 maxlen = 1
11571158 for arg in arglist :
1158- if isinstance (arg , basestring ) and hasattr (self .inputs , arg ):
1159+ if isinstance (arg , six . string_types ) and hasattr (self .inputs , arg ):
11591160 arg = getattr (self .inputs , arg )
11601161 if isinstance (arg , list ):
11611162 if (maxlen > 1 ) and (len (arg ) != maxlen ):
@@ -1168,7 +1169,7 @@ def _list_outputs(self):
11681169 for i in range (maxlen ):
11691170 argtuple = []
11701171 for arg in arglist :
1171- if isinstance (arg , basestring ) and \
1172+ if isinstance (arg , six . string_types ) and \
11721173 hasattr (self .inputs , arg ):
11731174 arg = getattr (self .inputs , arg )
11741175 if isinstance (arg , list ):
@@ -1725,7 +1726,7 @@ def _list_outputs(self):
17251726 for argnum , arglist in enumerate (args ):
17261727 maxlen = 1
17271728 for arg in arglist :
1728- if isinstance (arg , basestring ) and hasattr (self .inputs , arg ):
1729+ if isinstance (arg , six . string_types ) and hasattr (self .inputs , arg ):
17291730 arg = getattr (self .inputs , arg )
17301731 if isinstance (arg , list ):
17311732 if (maxlen > 1 ) and (len (arg ) != maxlen ):
@@ -1736,7 +1737,7 @@ def _list_outputs(self):
17361737 for i in range (maxlen ):
17371738 argtuple = []
17381739 for arg in arglist :
1739- if isinstance (arg , basestring ) and hasattr (self .inputs , arg ):
1740+ if isinstance (arg , six . string_types ) and hasattr (self .inputs , arg ):
17401741 arg = getattr (self .inputs , arg )
17411742 if isinstance (arg , list ):
17421743 argtuple .append (arg [i ])
0 commit comments