Skip to content

Commit 9021018

Browse files
committed
add return data (accidently removed return)
1 parent 1de934d commit 9021018

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

heudiconv/utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
from glob import glob
1515
from subprocess import check_output
1616

17+
try:
18+
from json.decoder import JSONDecodeError
19+
except ImportError:
20+
JSONDecodeError = ValueError
21+
1722
from nipype.utils.filemanip import which
1823

1924
import logging
@@ -175,11 +180,12 @@ def load_json(filename):
175180
try:
176181
with open(filename, 'r') as fp:
177182
data = json.load(fp)
178-
except json.JSONDecodeError:
183+
except JSONDecodeError:
179184
print("{fname} is not a valid json file".format(fname=filename))
180185
raise
181-
182186

187+
return data
188+
183189

184190
def assure_no_file_exists(path):
185191
"""Check if file or symlink (git-annex?) exists, and if so -- remove"""

0 commit comments

Comments
 (0)