mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/nvs_util_key_len' into 'master'
nvs_util: Add check for key len in input csv file See merge request espressif/esp-idf!5392
This commit is contained in:
commit
7ef42f2596
@ -903,6 +903,9 @@ def generate(args, is_encr_enabled=False, encr_key=None):
|
||||
print("\nCreating NVS binary with version:", version_set)
|
||||
for row in reader:
|
||||
try:
|
||||
# Check key length
|
||||
if len(row["key"]) > 15:
|
||||
raise InputError("Length of key `%s` should be <= 15 characters." % row["key"])
|
||||
write_entry(nvs_obj, row["key"], row["type"], row["encoding"], row["value"])
|
||||
except InputError as e:
|
||||
print(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user