mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 11:57:37 -02:30
Regress trailing comma modification and enhance error message
This commit is contained in:
@@ -62,9 +62,4 @@ class JSONParser(parsers.JSONParser):
|
||||
raise ParseError(_('JSON parse error - not a JSON object'))
|
||||
return obj
|
||||
except ValueError as exc:
|
||||
try:
|
||||
# PyYAML can also parse JSON-style input string, and support more flexible
|
||||
# input grammar like trailing commas.
|
||||
return yaml.load(data, OrderedDictLoader)
|
||||
except Exception:
|
||||
raise ParseError(_('JSON parse error - %s') % six.text_type(exc))
|
||||
raise ParseError(_('JSON parse error - %s\nPossible cause: trailing comma.' % six.text_type(exc)))
|
||||
|
||||
Reference in New Issue
Block a user