Merge branch 'bugfix/cmake_lambda_v3.1' into 'release/v3.1'

idf.py: Make the lambda function Python 2 & 3 compatible (backport v3.1)

See merge request idf/esp-idf!3249
pull/2905/head
Angus Gratton 2018-09-27 10:22:00 +08:00
commit 83b8f38484
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -338,7 +338,8 @@ def print_closing_message(args):
cmd += flasher_path(flasher_args[key]["file"])
else: # flashing the whole project
cmd = " ".join(flasher_args["write_flash_args"]) + " "
flash_items = sorted((o,f) for (o,f) in flasher_args["flash_files"].items() if len(o) > 0)
flash_items = sorted(((o,f) for (o,f) in flasher_args["flash_files"].items() if len(o) > 0),
key = lambda x: int(x[0], 0))
for o,f in flash_items:
cmd += o + " " + flasher_path(f) + " "