From bc45a965b25b1824a285189de98abf8725c8942e Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sat, 3 May 2014 20:48:09 -1000 Subject: [PATCH] remove some unused serialization code --- vcr/serializers/compat.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/vcr/serializers/compat.py b/vcr/serializers/compat.py index 42cfa7c..2b9e46b 100644 --- a/vcr/serializers/compat.py +++ b/vcr/serializers/compat.py @@ -2,33 +2,15 @@ import six def convert_to_bytes(resp): - #resp = convert_headers_to_bytes(resp) resp = convert_body_to_bytes(resp) return resp def convert_to_unicode(resp): - #resp = convert_headers_to_unicode(resp) resp = convert_body_to_unicode(resp) return resp -def convert_headers_to_bytes(resp): - try: - resp['headers'] = dict([(k.encode('utf-8'), [v.encode('utf-8') for v in values]) for k, values in resp['headers'].items()]) - except (KeyError, TypeError): - pass - return resp - - -def convert_headers_to_unicode(resp): - try: - resp['headers'] = dict([(k.decode('utf-8'), [v.decode('utf-8') for v in values]) for k, values in resp['headers'].items()]) - except (KeyError, TypeError): - pass - return resp - - def convert_body_to_bytes(resp): """ If the request body is a string, encode it to bytes (for python3 support)