1
0
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:
Ivan Grokhotkov 2018-02-17 16:31:45 +03:00 committed by Ivan Grokhotkov
parent aa37364e04
commit f0787e7106
2 changed files with 5 additions and 4 deletions

View File

@ -91,7 +91,7 @@
},
{
"name": "Digistump Oak"
},
}
],
"toolsDependencies": [
{

View File

@ -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)