Skip to content

Commit 57bb508

Browse files
committed
samples: cellular: lwm2m_client: Minor bugfix to provisioning script
Don't fail the provisioning script of some fields are not found on all serial ports. Signed-off-by: Seppo Takalo <[email protected]>
1 parent cdbcdac commit 57bb508

File tree

1 file changed

+3
-1
lines changed
  • samples/cellular/lwm2m_client/scripts

1 file changed

+3
-1
lines changed

samples/cellular/lwm2m_client/scripts/device.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ def get_com_ports(cls, sid):
151151
com_ports = []
152152
for item in comports():
153153
manufacturer_match = item.manufacturer in ('SEGGER', 'Nordic Semiconductor')
154+
if not manufacturer_match:
155+
continue
154156
serial_match = item.serial_number.lstrip("0") == sid
155-
if manufacturer_match and serial_match:
157+
if serial_match:
156158
com_ports.append(item.device)
157159
# Sort com ports on their integer identifiers, which takes care of corner case
158160
# where we have a cross-over from N digit to N + 1 digit identifiers

0 commit comments

Comments
 (0)