Skip to content

Commit

Permalink
changed to get_data
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyfiretail committed Feb 19, 2024
1 parent e9dfeea commit 983dd88
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions firetail/auditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,7 @@ def create(self, response, token, diff=-1, scrub_headers=None, debug=False):
logging.config.dictConfig(self.LOGGING)
self.logger = logging.getLogger("firetailLogger")
try:
if response.is_json:
try:
response_data = json.dumps(response.get_json())
except:
response_data = str(response.get_json())

else:
response_data = str(response.response[0].decode("utf-8"))
response_data = response.get_data(as_text=True)
except Exception:
response_data = ""
payload = {
Expand Down

0 comments on commit 983dd88

Please sign in to comment.