Skip to content

Commit 8fd175a

Browse files
committed
skip OCS parsing when status no content
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
1 parent 1b414fb commit 8fd175a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nc_py_api/_session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ def ocs(
198198
raise NextcloudException(408, info=info) from None
199199

200200
check_error(response, info)
201+
if response.status_code == 204: # NO_CONTENT
202+
return ""
201203
response_data = loads(response.text)
202204
ocs_meta = response_data["ocs"]["meta"]
203205
if ocs_meta["status"] != "ok":

0 commit comments

Comments
 (0)