Do not overwrite mbed_app.json if it exists#850
Conversation
mbed/mbed.py
Outdated
| if not os.path.exists(mbed_app_file_name): | ||
| data = {'target_overrides':{'K64F':{'platform.stdio-baud-rate': 9600}}} | ||
| with open(mbed_app_file_name, "w") as mbed_app_file: | ||
| mbed_app_file(json.dumps(data, filehandler, indent=4)) |
There was a problem hiding this comment.
I might have to go back and revisit dump vs dumps, as far as i remember, former was used with file handlers, and latter was just to dump strings.
mbed/mbed.py
Outdated
| if not os.path.exists(mbed_app_file_name): | ||
| data = {'target_overrides':{'K64F':{'platform.stdio-baud-rate': 9600}}} | ||
| with open(mbed_app_file_name, "w") as mbed_app_file: | ||
| mbed_app_file(json.dumps(data, filehandler, indent=4)) |
There was a problem hiding this comment.
mbed_app_file(json.dumps(data, filehandler, indent=4))
should be replaced with
mbed_app_file(json.dumps(data, mbed_app_file, indent=4)) ?
There was a problem hiding this comment.
Oh man yeah, I goofed this whole thing up lol, thanks for the catch. I was trying to go too quick.
89d2573 to
d93c7cb
Compare
|
Ok updated. I moved it to the |
d93c7cb to
eda751f
Compare
|
I think there's an issue with Mbed OS 5.11.4 and Python 3: ARMmbed/mbed-os#9521 (comment) So the error here is not related to the change. |
|
@bridadan In the Python 3 PR that you commented in (not sure why it doesn't show up as a link here...), I commented that it looks like an error that was caught with a PR coming into 5.11.5. Also mentioned that I'm looking to add basic compile tests in Travis CI to make sure this doesn't happen again... Not sure what you want to do from here. |
**Fixed:** * ARMmbed#850 Don't overwrite `mbed_app.json` on newly imported projects * ARMmbed#857 Stream downloads of mbed 2 zip files. Prevents Out of memory(OOM) errors
Fixes #848.