Skip to content

Commit 354d555

Browse files
author
Cruz Monrreal
authored
Merge pull request #7769 from OPpuolitaival/build_data_py3
Fix build_data functionality with python 3
2 parents 3795d39 + 2059fed commit 354d555

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

tools/build_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,4 +1356,4 @@ def merge_build_data(filename, toolchain_report, app_type):
13561356
if 'type' not in build[0]:
13571357
build[0]['type'] = app_type
13581358
build_data['builds'].append(build[0])
1359-
dump(build_data, open(filename, "wb"), indent=4, separators=(',', ': '))
1359+
dump(build_data, open(filename, "w"), indent=4, separators=(',', ': '))

tools/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@
220220
# NotSupportedException is handled by the build log
221221
pass
222222
except Exception as e:
223+
if options.verbose:
224+
import traceback
225+
traceback.print_exc()
223226
# Some other exception occurred, print the error message
224227
print(e)
225228

tools/toolchains/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def make_option_file(self, options, naming=".options_{}.txt"):
321321
except IOError:
322322
old_md5 = None
323323
if old_md5 != new_md5:
324-
with open(via_file, "w") as fd:
324+
with open(via_file, "wb") as fd:
325325
fd.write(to_write)
326326
return via_file
327327

0 commit comments

Comments
 (0)