diff --git a/mitmproxy/console/select.py b/mitmproxy/console/select.py index 928a7ca5e..7c6d1e965 100644 --- a/mitmproxy/console/select.py +++ b/mitmproxy/console/select.py @@ -72,7 +72,8 @@ class Heading: return opt -_neg = lambda: False +def _neg(*args): + return False class Option: diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py index 997a78305..80569a3c6 100644 --- a/mitmproxy/flow.py +++ b/mitmproxy/flow.py @@ -418,12 +418,16 @@ class FlowList(object): return +def _pos(*args): + return True + + class FlowView(FlowList): def __init__(self, store, filt=None): super(FlowView, self).__init__() if not filt: - filt = lambda flow: True + filt = _pos self._build(store, filt) self.store = store diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 5cf15b6fb..6165fd616 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -2,11 +2,6 @@ from __future__ import absolute_import, print_function, division import re -try: - from collections.abc import MutableMapping -except ImportError: # pragma: no cover - from collections import MutableMapping # Workaround for Python < 3.3 - import six from ..multidict import MultiDict from ..utils import always_bytes