Skip to content

Commit ba27855

Browse files
committed
close session
1 parent 44d69da commit ba27855

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

odata/connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ def _do_delete(self, *args, **kwargs):
7171
@catch_requests_errors
7272
def _do(self, *args, **kwargs):
7373
self._apply_options(kwargs)
74-
return self.session.request(*args, **kwargs)
74+
with self.session.request(*args, **kwargs) as response:
75+
response.raise_for_status()
76+
return response
7577

7678
def _handle_odata_error(self, response):
7779
try:

0 commit comments

Comments
 (0)