mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
pep8
This commit is contained in:
@@ -16,6 +16,7 @@ from vcr.request import Request
|
||||
from vcr.errors import CannotOverwriteExistingCassetteException
|
||||
from . import compat
|
||||
|
||||
|
||||
class VCRFakeSocket(object):
|
||||
"""
|
||||
A socket that doesn't do anything!
|
||||
@@ -35,7 +36,7 @@ class VCRFakeSocket(object):
|
||||
this descriptor and make sure it's not closed.
|
||||
Return file descriptor 0 since that's stdin.
|
||||
"""
|
||||
return 0 # wonder how bad this is....
|
||||
return 0 # wonder how bad this is....
|
||||
|
||||
|
||||
def parse_headers_backwards_compat(header_dict):
|
||||
|
||||
@@ -31,7 +31,7 @@ def get_headers(response):
|
||||
if six.PY3:
|
||||
header_list = response.msg._headers
|
||||
return [b': '.join((k.encode('utf-8'), v.encode('utf-8'))) + b'\r\n'
|
||||
for k, v in header_list]
|
||||
for k, v in header_list]
|
||||
else:
|
||||
return response.msg.headers
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class VCRHTTPSConnectionWithTimeout(VCRHTTPSConnection,
|
||||
for kw in unknown_keys:
|
||||
del safe_kwargs[kw]
|
||||
self.proxy_info = kwargs.pop('proxy_info', None)
|
||||
if not 'ca_certs' in kwargs or kwargs['ca_certs'] is None:
|
||||
if 'ca_certs' not in kwargs or kwargs['ca_certs'] is None:
|
||||
try:
|
||||
import httplib2
|
||||
self.ca_certs = httplib2.CA_CERTS
|
||||
|
||||
Reference in New Issue
Block a user