We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 535f22c commit 3d070f6Copy full SHA for 3d070f6
nipype/utils/nipype_cmd.py
@@ -3,7 +3,7 @@
3
import inspect
4
import sys
5
from nipype.interfaces.base import Interface
6
-
+from nipype.utils.misc import str2bool
7
8
def listClasses(module=None):
9
if module:
@@ -42,11 +42,11 @@ def run_instance(interface, options):
42
value = float(value)
43
except:
44
pass
45
- # try to cast string input to boolean
46
- if value == "true" or value == "True":
47
- value = True
48
- if value == "false" or value == "False":
49
- value = False
+ #try to cast string input to boolean
+ try:
+ value = str2bool(value)
+ except:
+ pass
50
try:
51
setattr(interface.inputs, input_name,
52
value)
0 commit comments