def _generate_faux_mime_message(parser, response, content):
 if (not isinstance(content, six.binary_type)):
  content = content.encode('utf-8')
 content_type = response['content-type']
 if (not isinstance(content_type, six.binary_type)):
  content_type = content_type.encode('utf-8')
 faux_message = ''.join(['Content-Type: ', content_type, '\nMIME-Version: 1.0\n\n', content])
 if six.PY2:
  return parser.parsestr(faux_message)
 else:
  return parser.parsestr(faux_message.decode('utf-8'))

def _generate_faux_mime_message ( parser , response , content ) : if ( not isinstance ( content , six . binary_type ) ) : content = content . encode ( 'utf-8' ) content_type = response [ 'content-type' ] if ( not isinstance ( content_type , six . binary_type ) ) : content_type = content_type . encode ( 'utf-8' ) faux_message = '' . join ( [ 'Content-Type: ' , content_type , '\nMIME-Version: 1.0\n\n' , content ] ) if six . PY2 : return parser . parsestr ( faux_message ) else : return parser . parsestr ( faux_message . decode ( 'utf-8' ) )
convert response .