]> granicus.if.org Git - esp-idf/commitdiff
idf.py: Make the lambda function Python 2 & 3 compatible
authorRoland Dobai <dobai.roland@gmail.com>
Tue, 11 Sep 2018 11:11:04 +0000 (13:11 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Tue, 11 Sep 2018 11:11:04 +0000 (13:11 +0200)
tools/idf.py

index ce46b83b323300fe628c99909c72c23f15d7330f..d68834a45f31c26c467734eefbfaa03e0e23c350 100755 (executable)
@@ -357,7 +357,7 @@ def print_closing_message(args):
         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),
-                                 key = lambda (o,_): int(o, 0))
+                                 key = lambda x: int(x[0], 0))
             for o,f in flash_items:
                 cmd += o + " " + flasher_path(f) + " "