wsdump, _abnf, _http: Compare to None
using in
This commit is contained in:
parent
4875da67a0
commit
2e0067117d
@ -28,7 +28,7 @@ ENCODING = get_encoding()
|
||||
|
||||
class VAction(argparse.Action):
|
||||
def __call__(self, parser, args, values, option_string=None):
|
||||
if values==None:
|
||||
if values is None:
|
||||
values = "1"
|
||||
try:
|
||||
values = int(values)
|
||||
|
@ -116,7 +116,7 @@ class ABNF(object):
|
||||
self.rsv3 = rsv3
|
||||
self.opcode = opcode
|
||||
self.mask = mask
|
||||
if data == None:
|
||||
if data is None:
|
||||
data = ""
|
||||
self.data = data
|
||||
self.get_mask_key = os.urandom
|
||||
@ -224,7 +224,7 @@ class ABNF(object):
|
||||
|
||||
data: data to mask/unmask.
|
||||
"""
|
||||
if data == None:
|
||||
if data is None:
|
||||
data = ""
|
||||
|
||||
if isinstance(mask_key, six.text_type):
|
||||
|
@ -161,7 +161,7 @@ def _ssl_socket(sock, user_sslopt, hostname):
|
||||
|
||||
certPath = os.path.join(
|
||||
os.path.dirname(__file__), "cacert.pem")
|
||||
if os.path.isfile(certPath) and user_sslopt.get('ca_certs', None) == None:
|
||||
if os.path.isfile(certPath) and user_sslopt.get('ca_certs', None) is None:
|
||||
sslopt['ca_certs'] = certPath
|
||||
check_hostname = sslopt["cert_reqs"] != ssl.CERT_NONE and sslopt.pop('check_hostname', True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user