Fix exception raised for certain non-JSON strings given to is_json
This is breaking pushes in production for certain manifests Fixes https://jira.prod.coreos.systems/browse/QS-60
This commit is contained in:
parent
5e5142a4d1
commit
2677720577
3 changed files with 40 additions and 2 deletions
|
@ -86,6 +86,6 @@ def is_json(value):
|
|||
try:
|
||||
json.loads(value)
|
||||
return True
|
||||
except TypeError:
|
||||
except (TypeError, ValueError):
|
||||
return False
|
||||
|
||||
return False
|
||||
|
|
Reference in a new issue