Skip to content

Commit

Permalink
Fix of the if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
DamMicSzm committed Jun 27, 2023
1 parent d556e00 commit 0e062cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/controller/python/chip/ChipBleUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def __init__(self, pairingState, discriminator, vendorId, productId):


def ParseServiceData(data):
if len(data) is not SERVICE_DATA_LEN:
if len(data) != SERVICE_DATA_LEN:
return None
return BleDeviceIdentificationInfo(
int(data[0]),
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/ChipDeviceCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def HandlePASEEstablishmentComplete(err: PyChipError):
else:
print("Established secure session with Device")

if self.state is not DCState.COMMISSIONING:
if self.state != DCState.COMMISSIONING:
# During Commissioning, HandlePASEEstablishmentComplete will also be called,
# in this case the async operation should be marked as finished by
# HandleCommissioningComplete instead this function.
Expand Down
8 changes: 4 additions & 4 deletions src/controller/python/chip/tlv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def _encodeControlAndTag(self, type, tag, lenOfLenOrVal=0):
controlByte |= 3
if tag is None:
if (
type is not TLVEndOfContainer
type != TLVEndOfContainer
and len(self._containerStack) != 0
and self._containerStack[0] == TLV_TYPE_STRUCTURE
):
Expand Down Expand Up @@ -443,9 +443,9 @@ def _encodeUnsignedInt(val):
@staticmethod
def _verifyValidContainerType(containerType):
if (
containerType is not TLV_TYPE_STRUCTURE
and containerType is not TLV_TYPE_ARRAY
and containerType is not TLV_TYPE_PATH
containerType != TLV_TYPE_STRUCTURE
and containerType != TLV_TYPE_ARRAY
and containerType != TLV_TYPE_PATH
):
raise ValueError("Invalid TLV container type")

Expand Down

0 comments on commit 0e062cd

Please sign in to comment.