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

raise NotMasterError to indicate to client that it is safe to retry, … #130

Closed
wants to merge 2 commits into from

Conversation

psi29a
Copy link
Contributor

@psi29a psi29a commented Sep 18, 2015

…cleanup, add explicit test for AutoReconnect

@@ -297,12 +297,11 @@ def _get_write_concern(self, safe=None, **wc_options):
# In this case safe=True must issue getLastError without args
# even if connection-level write concern was unacknowledged
return WriteConcern()
elif safe == False:
elif not safe:
Copy link
Contributor

Choose a reason for hiding this comment

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

may be just else here? and remove final return self.write_concern. It is unreachable with this elif not safe anyways

…cleanup, add explicit test for AutoReconnect

no with raises in twisted versions below 15

less code is better
retry_delay sounds better
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