This commit is contained in:
parent
d7556f84b4
commit
625c2c2af0
@ -54,7 +54,7 @@ class FlareRequests(requests.Session):
|
|||||||
|
|
||||||
content = response.json()
|
content = response.json()
|
||||||
|
|
||||||
if "solution" in content:
|
if "solution" in content and content["solution"]:
|
||||||
solution = content["solution"]
|
solution = content["solution"]
|
||||||
raw = solution["response"].encode()
|
raw = solution["response"].encode()
|
||||||
encoding = charset_normalizer.detect(raw)
|
encoding = charset_normalizer.detect(raw)
|
||||||
@ -70,14 +70,14 @@ class FlareRequests(requests.Session):
|
|||||||
|
|
||||||
return resolved
|
return resolved
|
||||||
|
|
||||||
raise requests.RequestException(response)
|
raise requests.RequestException(content["message"], response=response)
|
||||||
except requests.RequestException:
|
except requests.RequestException:
|
||||||
session = requests.post(
|
session = requests.post(
|
||||||
FLARE_ENDPOINT,
|
FLARE_ENDPOINT,
|
||||||
json={"cmd": "sessions.destroy", "session": FLARE_SESSION},
|
json={"cmd": "sessions.destroy", "session": FLARE_SESSION},
|
||||||
)
|
)
|
||||||
|
|
||||||
raise requests.RequestException(solution)
|
raise requests.RequestException(content["message"], response=response)
|
||||||
|
|
||||||
|
|
||||||
session = FlareRequests()
|
session = FlareRequests()
|
||||||
|
Loading…
Reference in New Issue
Block a user