Skip to content

Fix build_data functionality with python 3 #7769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,4 +1356,4 @@ def merge_build_data(filename, toolchain_report, app_type):
if 'type' not in build[0]:
build[0]['type'] = app_type
build_data['builds'].append(build[0])
dump(build_data, open(filename, "wb"), indent=4, separators=(',', ': '))
dump(build_data, open(filename, "w"), indent=4, separators=(',', ': '))
3 changes: 3 additions & 0 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
# NotSupportedException is handled by the build log
pass
except Exception as e:
if options.verbose:
import traceback
traceback.print_exc()
# Some other exception occurred, print the error message
print(e)

Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def make_option_file(self, options, naming=".options_{}.txt"):
except IOError:
old_md5 = None
if old_md5 != new_md5:
with open(via_file, "w") as fd:
with open(via_file, "wb") as fd:
fd.write(to_write)
return via_file

Expand Down