mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
nvs_util: Add check for keylen in input csv
This commit is contained in:
parent
df4df2f493
commit
8a2ff86c87
@ -648,6 +648,8 @@ def nvs_part_gen(input_filename=None, output_filename=None, key_gen=None, encryp
|
|||||||
reader = csv.DictReader(input_file, delimiter=',')
|
reader = csv.DictReader(input_file, delimiter=',')
|
||||||
for row in reader:
|
for row in reader:
|
||||||
try:
|
try:
|
||||||
|
if len(row["key"]) > 15:
|
||||||
|
raise InputError("Error: Length of key `%s` should be <= 15 characters." % row["key"])
|
||||||
write_entry(nvs_obj, row["key"], row["type"], row["encoding"], row["value"])
|
write_entry(nvs_obj, row["key"], row["type"], row["encoding"], row["value"])
|
||||||
except (InputError) as e:
|
except (InputError) as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user