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 e62aef0 commit df2b0b7Copy full SHA for df2b0b7
nipype/interfaces/io.py
@@ -2717,16 +2717,14 @@ class JSONFileGrabber(IOBase):
2717
def _list_outputs(self):
2718
import simplejson
2719
2720
- outputs = {}
2721
if isdefined(self.inputs.in_file):
2722
with open(self.inputs.in_file) as f:
2723
- data = simplejson.load(f)
+ outputs = simplejson.load(f)
2724
2725
- if not isinstance(data, dict):
+ if not isinstance(outputs, dict):
2726
raise RuntimeError("JSON input has no dictionary structure")
2727
-
2728
- for key, value in list(data.items()):
2729
- outputs[key] = value
+ else:
+ outputs = {}
2730
2731
if isdefined(self.inputs.defaults):
2732
defaults = self.inputs.defaults
0 commit comments