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