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