Convert the JSON output from yarn properly

This commit is contained in:
Neel Patel 2019-02-19 13:18:37 +00:00 committed by Dave Page
parent 841af6868d
commit ccb0796317

View File

@ -149,7 +149,11 @@ def get_js_deps():
process.wait()
# Cleanup the output
raw_data = json.loads(output.splitlines()[-1])
output_str = output.splitlines()[-1]
if hasattr(output_str, 'decode'):
output_str = output_str.decode('utf-8')
raw_data = json.loads(output_str)
modules = raw_data['data']['body']
# Loop through the modules, and output the data.