]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
remove some unused serialization code
authorKevin McCarthy <me@kevinmccarthy.org>
Sun, 4 May 2014 06:48:09 +0000 (20:48 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Sat, 10 May 2014 21:52:35 +0000 (11:52 -1000)
vcr/serializers/compat.py

index 42cfa7c40b7045b1cd006c08265e3186aafe2bbc..2b9e46b3b0efb269529a55430820b5fe824c9281 100644 (file)
@@ -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)