@@ -58,7 +58,7 @@ def print_list(lst):
58
58
59
59
60
60
def print_category (results , index , message ):
61
- summary = [example for key , summ in results .items ()
61
+ summary = [example for key , summ in list ( results .items () )
62
62
for example in summ [index ]]
63
63
if all (len (s ) == 0 for s in summary ):
64
64
return
@@ -256,7 +256,7 @@ def get_num_failures(results, export=False):
256
256
"""
257
257
num_failures = 0
258
258
259
- for key , val in results .items ():
259
+ for key , val in list ( results .items () ):
260
260
num_failures = num_failures + len (val [3 ])
261
261
if export :
262
262
num_failures += len (val [4 ])
@@ -384,7 +384,7 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
384
384
successes = []
385
385
compiled = True
386
386
pass_status = True
387
- if example . has_key ( 'test' ) and example ['test' ] and example . has_key ( 'baud_rate' ) and example . has_key ( 'compare_log' ) :
387
+ if 'test' in example and example ['test' ] and 'baud_rate' in example and 'compare_log' in example :
388
388
test_example = True
389
389
else :
390
390
test_example = False
@@ -408,6 +408,7 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
408
408
proc = subprocess .Popen (build_command , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
409
409
410
410
std_out , std_err = proc .communicate ()
411
+ std_out = std_out .decode ('utf-8' )
411
412
print ("\n #### STDOUT ####\n %s\n #### STDERR ####\n %s\n #### End of STDOUT/STDERR ####\n " % (std_out ,std_err ))
412
413
413
414
if test_example :
@@ -427,7 +428,7 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
427
428
if test_example :
428
429
test_group = "{}-{}-{}" .format (target , toolchain , example ['baud_rate' ])
429
430
if image :
430
- if not test_json ['builds' ]. has_key ( test_group ) :
431
+ if not test_group in test_json ['builds' ]:
431
432
test_json ['builds' ][test_group ] = {
432
433
"platform" :target ,
433
434
"toolchain" : toolchain ,
0 commit comments