diff options
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r-- | libmproxy/protocol/__init__.py | 6 | ||||
-rw-r--r-- | libmproxy/protocol/http.py | 2 | ||||
-rw-r--r-- | libmproxy/protocol/primitives.py | 6 |
3 files changed, 4 insertions, 10 deletions
diff --git a/libmproxy/protocol/__init__.py b/libmproxy/protocol/__init__.py index 123c31e0..4c72ad48 100644 --- a/libmproxy/protocol/__init__.py +++ b/libmproxy/protocol/__init__.py @@ -15,14 +15,14 @@ class ProtocolHandler(object): self.c = c """@type: libmproxy.proxy.ConnectionHandler""" - def handle_messages(self): + def handle_messages(self): # pragma: nocover """ This method gets called if a client connection has been made. Depending on the proxy settings, a server connection might already exist as well. """ raise NotImplementedError - def handle_error(self, error): + def handle_error(self, error): # pragma: nocover """ This method gets called should there be an uncaught exception during the connection. This might happen outside of handle_messages, e.g. if the initial SSL handshake fails in transparent mode. @@ -90,7 +90,7 @@ def _handler(conntype, connection_handler): if conntype in protocols: return protocols[conntype]["handler"](connection_handler) - raise NotImplementedError + raise NotImplementedError # pragma: nocover def handle_messages(conntype, connection_handler): diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 2a9f9afe..21624513 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -824,7 +824,7 @@ class HttpAuthenticationError(Exception): def __init__(self, auth_headers=None): self.auth_headers = auth_headers - def __str__(self): + def __str__(self): # pragma: nocover return "HttpAuthenticationError" diff --git a/libmproxy/protocol/primitives.py b/libmproxy/protocol/primitives.py index d1546ddd..673628bc 100644 --- a/libmproxy/protocol/primitives.py +++ b/libmproxy/protocol/primitives.py @@ -88,12 +88,6 @@ class Flow(stateobject.SimpleStateObject, BackreferenceMixin): d.update(version=version.IVERSION) return d - @classmethod - def _from_state(cls, state): - f = cls(None, None, None) - f._load_state(state) - return f - def __eq__(self, other): return self is other |