Skip to content

Commit

Permalink
boards.txt.py: Fix packagegen to use newfilestr instead of filestr wh…
Browse files Browse the repository at this point in the history
…en writing file. (#7018)

Three missing boards are now in package/package_esp8266com_index.template.json.
  • Loading branch information
mhightower83 authored and d-a-v committed Jan 17, 2020
1 parent bb6243a commit b930c4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion package/package_esp8266com_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
{
"name": "SparkFun ESP8266 Thing Dev"
},
{
"name": "SparkFun Blynk Board"
},
{
"name": "SweetPea ESP-210"
},
Expand Down Expand Up @@ -106,6 +109,12 @@
},
{
"name": "ESPectro Core"
},
{
"name": "ITEAD Sonoff"
},
{
"name": "DOIT ESP-Mx DevKit (ESP8285)"
}
],
"toolsDependencies": [
Expand Down Expand Up @@ -359,4 +368,4 @@
]
}
]
}
}
4 changes: 2 additions & 2 deletions tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@
'resetmethod_nodtr_nosync': collections.OrderedDict([
( '.upload.resetmethod', '--before no_reset_no_sync --after soft_reset' ),
]),

####################### menu.FlashMode

'flashmode_menu': collections.OrderedDict([
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b930c4c

Please sign in to comment.