Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: cleanup finally-returns #614

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Enhancements and Fixes
- New sub-package discover for global dataset discovery. [#470]


Bug Fixes
---------

- Fix propagating some previously swallowed exceptions. [#614]


Deprecations and Removals
-------------------------

Expand Down
12 changes: 5 additions & 7 deletions pyvo/dal/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def execute_stream(self, *, post=False):
except requests.RequestException as ex:
# save for later use
self._ex = ex
finally:
return response.raw

return response.raw

def submit(self, *, post=False):
"""
Expand Down Expand Up @@ -1050,11 +1050,9 @@ def fileobj(self):

return fileobj

fileobj = self._content
try:
fileobj = open(self._content)
finally:
return fileobj
fileobj = open(self._content)

return fileobj

def uri(self):
"""
Expand Down