mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
boards.txt.py: fix trailing comma in generated JSON
This commit is contained in:
committed by
Ivan Grokhotkov
parent
aa37364e04
commit
f0787e7106
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user