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

Handle exceptions in generators passed to Connection.executemany() #88

Merged
merged 1 commit into from
Mar 16, 2017

Conversation

elprans
Copy link
Member

@elprans elprans commented Mar 14, 2017

Fixes: #85

@elprans elprans requested a review from 1st1 March 14, 2017 20:48
@@ -235,6 +235,10 @@ cdef class CoreProtocol:
buf = <WriteBuffer>next(self._execute_iter)
except StopIteration:
self._push_result()
except BaseException as e:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1st1 Safe to catch BaseException here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change to Exception.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@elprans elprans self-assigned this Mar 15, 2017
@elprans elprans force-pushed the fix-executemany-with-bad-generator branch from 1f6ae4d to 88ca460 Compare March 16, 2017 15:50
@elprans elprans merged commit 8d17ecc into master Mar 16, 2017
@elprans elprans deleted the fix-executemany-with-bad-generator branch March 16, 2017 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants