Merge pull request #7769 from OPpuolitaival/build_data_py3

Fix build_data functionality with python 3
pull/7742/merge
Cruz Monrreal 2018-08-16 09:07:49 -05:00 committed by GitHub
commit 354d55503f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -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=(',', ': '))

View File

@ -220,6 +220,9 @@ if __name__ == '__main__':
# 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)

View File

@ -321,7 +321,7 @@ class mbedToolchain:
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