Commit 192211b3 authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team
Browse files

vidjil_utils: cleanup_json_sample is not useful on the whole output

parent da00d93c
......@@ -279,10 +279,11 @@ def extract_fields_from_json(json_fields, pos_in_list, filename, max_bytes = Non
if max_bytes is None:
json_dict = json.loads(cleanup_json_sample(open(filename).read()))
json_dict = json.loads(open(filename).read())
json_dict = json.loads(cleanup_json_sample(open(filename).read(max_bytes)))
except IOError:
current.log.debug('JSON loading failed')
json_dict = {}
except ValueError as e:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment