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

Closes session in find_first_response #140

Merged
merged 2 commits into from
Oct 26, 2017

Conversation

pin3da
Copy link
Contributor

@pin3da pin3da commented Oct 11, 2017

This resolves the warning: tldextract/tldextract.py:278: ResourceWarning: unclosed

@@ -38,7 +38,9 @@ def find_first_response(urls):
except requests.exceptions.RequestException as ree:
LOG.error('Exception reading Public Suffix List url ' + url + ' - ' + str(ree) + '.')
else:
Copy link
Owner

Choose a reason for hiding this comment

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

This doesn't close session if it was opened but there's an exception. I'll switch to using it as a context manager. This should still be readable, without crazy try nesting.

pin3da and others added 2 commits October 26, 2017 15:46
This resolves the warning:
  tldextract/tldextract.py:278: ResourceWarning: unclosed
@john-kurkowski
Copy link
Owner

Rebased Atop Latest Upstream Branch (RALUB).

@john-kurkowski
Copy link
Owner

Thanks for tracking this down! CI failures are also on master. They're not to do with this PR. Merging.

@john-kurkowski john-kurkowski merged commit 0fa8b78 into john-kurkowski:master Oct 26, 2017
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

2 participants