ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
47 stars 78 forks source link

target: Add Target.revertable_write_value(may_not_exist=False) #605

Closed douglas-raillard-arm closed 1 year ago

douglas-raillard-arm commented 2 years ago

Add a may_not_exist parameter to Target.revertable_write_value() that will turn the write into a no-op if the file does not exist or cannot be read. If may_not_exist is a callable, it will be called with the parameters of the function. This can be used to e.g. log the issue at a higher logging level.

douglas-raillard-arm commented 1 year ago

Closing as this can be handled on user side with an exception combinator: https://github.com/ARM-software/lisa/pull/1883 If there is interest again for that feature in devlib from other parties, we can simply import that LISA bit in devlib utils.