mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
boards.txt.py: fix trailing comma in generated JSON
This commit is contained in:
committed by
Ivan Grokhotkov
parent
aa37364e04
commit
f0787e7106
@ -91,7 +91,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Digistump Oak"
|
"name": "Digistump Oak"
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
"toolsDependencies": [
|
"toolsDependencies": [
|
||||||
{
|
{
|
||||||
|
@ -1182,9 +1182,10 @@ def package ():
|
|||||||
filestr = package_file.read()
|
filestr = package_file.read()
|
||||||
|
|
||||||
substitution = '"boards": [\n'
|
substitution = '"boards": [\n'
|
||||||
for id in boards:
|
board_items = [' {\n "name": "%s"\n }' % boards[id]['name']
|
||||||
substitution += ' {\n "name": "' + boards[id]['name'] + '"\n },\n'
|
for id in boards]
|
||||||
substitution += ' ],'
|
substitution += ',\n'.join(board_items)
|
||||||
|
substitution += '\n ],'
|
||||||
|
|
||||||
newfilestr = re.sub(r'"boards":[^\]]*\],', substitution, filestr, re.MULTILINE)
|
newfilestr = re.sub(r'"boards":[^\]]*\],', substitution, filestr, re.MULTILINE)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user