Skip to content

Commit

Permalink
skip OCS parsing when status no content
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Jan 1, 2024
1 parent 1b414fb commit 8fd175a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nc_py_api/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def ocs(
raise NextcloudException(408, info=info) from None

check_error(response, info)
if response.status_code == 204: # NO_CONTENT
return ""
response_data = loads(response.text)
ocs_meta = response_data["ocs"]["meta"]
if ocs_meta["status"] != "ok":
Expand Down

0 comments on commit 8fd175a

Please sign in to comment.