fix: Improper json check on non-json responses

Fix #854
pull/858/head
Raphaël Vinot 2022-08-03 11:38:21 +02:00
parent 3ceba3feb1
commit 5a0080289f
1 changed files with 1 additions and 1 deletions

View File

@ -2580,7 +2580,7 @@ class PyMISP:
return self._csv_to_dict(normalized_response_text) # type: ignore
else:
return normalized_response_text
elif return_format in ['stix-xml', 'text']:
elif return_format not in ['json', 'yara-json']:
return self._check_response(response)
normalized_response = self._check_json_response(response)