File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -618,10 +618,6 @@ async def test_znp_nvram_writes(znp, event_loop):
618
618
619
619
znp ._uart .send .reset_mock ()
620
620
621
- # Writing too big of a value should fail
622
- with pytest .raises (ValueError ):
623
- await znp .nvram_write (nvids .NwkNvIds .STARTUP_OPTION , t .uint16_t (0xAABB ))
624
-
625
621
# The SYS_OSAL_NV_WRITE response status should be checked
626
622
event_loop .call_soon (
627
623
znp .frame_received ,
Original file line number Diff line number Diff line change @@ -347,23 +347,6 @@ async def nvram_write(
347
347
if not isinstance (value , bytes ):
348
348
value = value .serialize ()
349
349
350
- # Find the next NVID in the table to check that our write doesn't overflow
351
- # It's not foolproof, but it will catch simple mistakes
352
- all_enum_values = list (type (nv_id ))
353
- all_enum_values .sort (key = lambda i : i .value )
354
- index = all_enum_values .index (nv_id )
355
-
356
- if index == len (all_enum_values ) - 1 :
357
- LOGGER .warning (
358
- "NVID is at end of table, cannot check for overflow"
359
- ) # pragma: no cover
360
- else :
361
- next_nvid = all_enum_values [index + 1 ]
362
- end_address = nv_id + offset + len (value )
363
-
364
- if end_address > next_nvid :
365
- raise ValueError ("OSALNVWrite request overflows into %s" , next_nvid )
366
-
367
350
return await self .request (
368
351
SysCommands .OSALNVWrite .Req (
369
352
Id = nv_id , Offset = offset , Value = t .ShortBytes (value )
You can’t perform that action at this time.
0 commit comments