Fix status code errors
This commit is contained in:
parent
f529f8fcd2
commit
86cc7add2d
@ -198,7 +198,9 @@ class RedfishSession:
|
|||||||
response = requests.post(url, data=payload, headers=self.headers, verify=False)
|
response = requests.post(url, data=payload, headers=self.headers, verify=False)
|
||||||
logger.debug(f"Response: {response.status_code}")
|
logger.debug(f"Response: {response.status_code}")
|
||||||
|
|
||||||
if response.status_code in [200, 201, 204]:
|
if response.status_code in [201, 204]:
|
||||||
|
return {"response": "ok"}
|
||||||
|
elif response.status_code in [200]:
|
||||||
try:
|
try:
|
||||||
return response.json()
|
return response.json()
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user