File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ async def commission_with_code(
228
228
# that are a bit unstable.
229
229
# by retrying, we increase the chances of a successful commisssion
230
230
while attempts <= MAX_COMMISSION_RETRIES :
231
+ attempts += 1
231
232
LOGGER .info (
232
233
"Starting Matter commissioning with code using Node ID %s (attempt %s/%s)." ,
233
234
node_id ,
@@ -247,7 +248,7 @@ async def commission_with_code(
247
248
f"Commission with code failed for node { node_id } ."
248
249
)
249
250
await asyncio .sleep (5 )
250
- attempts += 1
251
+
251
252
LOGGER .info ("Matter commissioning of Node ID %s successful." , node_id )
252
253
253
254
# perform full (first) interview of the device
@@ -305,6 +306,7 @@ async def commission_on_network(
305
306
# that are a bit unstable.
306
307
# by retrying, we increase the chances of a successful commisssion
307
308
while attempts <= MAX_COMMISSION_RETRIES :
309
+ attempts += 1
308
310
if ip_addr is None :
309
311
# regular CommissionOnNetwork if no IP address provided
310
312
LOGGER .info (
@@ -339,7 +341,6 @@ async def commission_on_network(
339
341
if not success and attempts >= MAX_COMMISSION_RETRIES :
340
342
raise NodeCommissionFailed (f"Commissioning failed for node { node_id } ." )
341
343
await asyncio .sleep (5 )
342
- attempts += 1
343
344
344
345
LOGGER .info ("Matter commissioning of Node ID %s successful." , node_id )
345
346
You can’t perform that action at this time.
0 commit comments