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

Fix error handling for authentication and no longer use session for retries #141

Merged
merged 1 commit into from Jan 12, 2020

Conversation

pnbruckner
Copy link
Collaborator

_generate_token() only caught CommError's if they happened while trying Basic Authentication. Now it will catch them while trying Digest Authentication.

Clear auth token for any LoginError.

_command() was using a Session() for retry attempts. Don't do this anymore to make it more likely for retry to succeed. Also, for some as of yet unexplained reason using request.get() instead of session.get() seems to prevent intermittent snapshot failures.

src/amcrest/http.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jan 12, 2020

Coverage Status

Coverage increased (+0.002%) to 31.641% when pulling 9e0c89c on fix-http-command into fdbb775 on master.

@pnbruckner pnbruckner merged commit adec200 into master Jan 12, 2020
@pnbruckner pnbruckner deleted the fix-http-command branch January 12, 2020 20:04
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.

None yet

3 participants