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