mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
nvs_util: Add support to include comments in csv file
Closes https://github.com/espressif/esp-idf/issues/2965
(cherry picked from commit 66e38e9bac
)
This commit is contained in:
parent
1cb29ac446
commit
1b8dd9f173
@ -752,7 +752,7 @@ def nvs_part_gen(input_filename=None, output_filename=None, input_part_size=None
|
||||
output_file = open(output_filename, 'wb')
|
||||
|
||||
with nvs_open(output_file, input_size) as nvs_obj:
|
||||
reader = csv.DictReader(input_file, delimiter=',')
|
||||
reader = csv.DictReader(filter(lambda row: row[0] != '#',input_file), delimiter=',')
|
||||
for row in reader:
|
||||
try:
|
||||
write_entry(nvs_obj, row["key"], row["type"], row["encoding"], row["value"])
|
||||
|
@ -1,3 +1,4 @@
|
||||
# Sample csv file
|
||||
key,type,encoding,value
|
||||
dummyNamespace,namespace,,
|
||||
dummyU8Key,data,u8,127
|
||||
|
|
@ -1,3 +1,4 @@
|
||||
# Sample csv file
|
||||
key,type,encoding,value
|
||||
dummyNamespace,namespace,,
|
||||
dummyU8Key,data,u8,127
|
||||
|
|
Loading…
Reference in New Issue
Block a user