1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

boards.txt.py: Fix packagegen to use newfilestr instead of filestr when writing file. (#7018)

Three missing boards are now in package/package_esp8266com_index.template.json.
This commit is contained in:
M Hightower 2020-01-17 09:24:47 -08:00 committed by david gauchard
parent bb6243a17b
commit b930c4c3e6
2 changed files with 12 additions and 3 deletions

View File

@ -62,6 +62,9 @@
{
"name": "SparkFun ESP8266 Thing Dev"
},
{
"name": "SparkFun Blynk Board"
},
{
"name": "SweetPea ESP-210"
},
@ -106,6 +109,12 @@
},
{
"name": "ESPectro Core"
},
{
"name": "ITEAD Sonoff"
},
{
"name": "DOIT ESP-Mx DevKit (ESP8285)"
}
],
"toolsDependencies": [
@ -359,4 +368,4 @@
]
}
]
}
}

View File

@ -1043,7 +1043,7 @@ macros = {
'resetmethod_nodtr_nosync': collections.OrderedDict([
( '.upload.resetmethod', '--before no_reset_no_sync --after soft_reset' ),
]),
####################### menu.FlashMode
'flashmode_menu': collections.OrderedDict([
@ -1635,7 +1635,7 @@ def package ():
# To get consistent indent/formatting read the JSON and write it out programattically
if packagegen:
with open(pkgfname, 'w') as package_file:
filejson = json.loads(filestr, object_pairs_hook=collections.OrderedDict)
filejson = json.loads(newfilestr, object_pairs_hook=collections.OrderedDict)
package_file.write(json.dumps(filejson, indent=3, separators=(',',': ')))
print("updated: %s" % pkgfname)
else: