diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-05-21 15:01:19 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-05-21 15:01:19 +1200 |
commit | 97f3077082371a078380ec28e1425de3dc2a0021 (patch) | |
tree | 9bb2e4dfeacec85209174672fee3e78df32dcfaf /netlib/utils.py | |
parent | 14fb2eeb1ea734d161e84be3920691591f6531a3 (diff) | |
parent | 43d796553292a9bbf2c174e31e5e0e39e1068be1 (diff) | |
download | mitmproxy-97f3077082371a078380ec28e1425de3dc2a0021.tar.gz mitmproxy-97f3077082371a078380ec28e1425de3dc2a0021.tar.bz2 mitmproxy-97f3077082371a078380ec28e1425de3dc2a0021.zip |
Merge branch 'mhils-multidict'
Diffstat (limited to 'netlib/utils.py')
-rw-r--r-- | netlib/utils.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/netlib/utils.py b/netlib/utils.py index be2701a0..7499f71f 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -51,17 +51,6 @@ def always_bytes(unicode_or_bytes, *encode_args): return unicode_or_bytes -def always_byte_args(*encode_args): - """Decorator that transparently encodes all arguments passed as unicode""" - def decorator(fun): - def _fun(*args, **kwargs): - args = [always_bytes(arg, *encode_args) for arg in args] - kwargs = {k: always_bytes(v, *encode_args) for k, v in six.iteritems(kwargs)} - return fun(*args, **kwargs) - return _fun - return decorator - - def native(s, *encoding_opts): """ Convert :py:class:`bytes` or :py:class:`unicode` to the native |