Merge pull request #260 from hugovk/deprecation-warnings
Close HTTPSConnection in case of exception
This commit is contained in:
commit
a144ce407d
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -47,8 +47,9 @@ htmlcov/
|
||||||
.cache
|
.cache
|
||||||
nosetests.xml
|
nosetests.xml
|
||||||
coverage.xml
|
coverage.xml
|
||||||
*,cover
|
*.cover
|
||||||
.hypothesis/
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
|
|
@ -857,7 +857,9 @@ class _Request(object):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise MalformedResponseError(self.network, e)
|
raise MalformedResponseError(self.network, e)
|
||||||
|
|
||||||
|
try:
|
||||||
self._check_response_for_errors(response_text)
|
self._check_response_for_errors(response_text)
|
||||||
|
finally:
|
||||||
conn.close()
|
conn.close()
|
||||||
return response_text
|
return response_text
|
||||||
|
|
||||||
|
|
4
pytest.ini
Normal file
4
pytest.ini
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[pytest]
|
||||||
|
filterwarnings =
|
||||||
|
once::DeprecationWarning
|
||||||
|
once::PendingDeprecationWarning
|
Loading…
Reference in a new issue