None compares

This commit is contained in:
Sebastian Bachmann 2017-06-19 15:11:27 +02:00
parent 1e11b29a6d
commit fa09ef768b
2 changed files with 5 additions and 5 deletions

View File

@ -2769,7 +2769,7 @@ class EncodedField(object):
:rtype: string
"""
if self.access_flags_string == None:
if self.access_flags_string is None:
self.access_flags_string = get_access_flags_string(
self.get_access_flags())
@ -2801,7 +2801,7 @@ class EncodedField(object):
self.get_access_flags_string()))
init_value = self.get_init_value()
if init_value != None:
if init_value is not None:
bytecode._PrintDefault("\tinit value: %s\n" %
str(init_value.get_value()))
@ -3188,7 +3188,7 @@ class EncodedMethod(object):
:param idx: the index
:type idx: int
"""
if self.code != None:
if self.code is not None:
self.code.set_idx(idx)
def set_name(self, value):
@ -3196,7 +3196,7 @@ class EncodedMethod(object):
self._reload()
def get_raw(self):
if self.code != None:
if self.code is not None:
self.code_off = self.code.get_off()
return writeuleb128(self.method_idx_diff) + writeuleb128(

View File

@ -170,7 +170,7 @@ platform_version, sdk_version = getPlatformVersions(
aosp_root_dir=PATH_TO_AOSP_ROOT)
print("Detected sdk_version [%s], platform_version [%s]..." % (platform_version,
sdk_version))
if sdk_version == None:
if sdk_version is None:
print("Cannot detect SDK version. Exiting!")
exit(1)