summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Falcão Gonçalves de Moura <gabriel@nacaolivre.org>2023-04-25 22:45:53 +0000
committerGabriel Falcão Gonçalves de Moura <gabriel@nacaolivre.org>2023-04-25 22:45:53 +0000
commit8f695544faca0612a8eeb5df4dd8c52abdd91679 (patch)
tree067e29231f4edb1fe972261888cb633ad98dc115
parentf9f012711597634d40066d144a36888b3addcc46 (diff)
downloadhttpretty-fix-466.tar.gz
chore: draftfix-466
-rw-r--r--httpretty/core.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/httpretty/core.py b/httpretty/core.py
index 6968645..51d104c 100644
--- a/httpretty/core.py
+++ b/httpretty/core.py
@@ -452,18 +452,12 @@ class FakeSockFile(object):
self.flush()
def flush(self):
- try:
- super().flush()
- except Exception as e:
- logger.debug('error closing file {}: {}'.format(self, e))
-
+ logger.debug('{} flushing socket'.format(self))
try:
self.file.flush()
except Exception as e:
logger.debug('error closing file {}: {}'.format(self.file, e))
-
-
def fileno(self):
return self._fileno
@@ -484,7 +478,6 @@ class FakeSockFile(object):
self.file.close()
-
class FakeSSLSocket(object):
"""Shorthand for :py:class:`~httpretty.core.fakesock`
"""
@@ -507,6 +500,7 @@ def fake_socketpair(*args, **kw):
with restored_libs():
return old_socketpair(*args, **kw)
+
class fakesock(object):
"""
fake :py:mod:`socket`
@@ -520,6 +514,7 @@ class fakesock(object):
debuglevel = 0
_sent_data = []
is_secure = False
+
def __init__(
self,
family=socket.AF_INET,