X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=tools%2Fb43-tools%2Ffiles%2Fb43-fwsquash.py;h=6b4952cbc1dc4fdd2442dbb3d635f4b6e43c0e2f;hb=97bc87d81a98dc0597b6492017cef9098cc9c012;hp=2946d7c3c32450d11980d60072c03f5eb69c243b;hpb=d5397be2cc62a8d12243ded39d818bbf7ae6de86;p=openwrt%2F.git diff --git a/tools/b43-tools/files/b43-fwsquash.py b/tools/b43-tools/files/b43-fwsquash.py index 2946d7c3c3..6b4952cbc1 100755 --- a/tools/b43-tools/files/b43-fwsquash.py +++ b/tools/b43-tools/files/b43-fwsquash.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # b43 firmware file squasher # Removes unnecessary firmware files @@ -37,7 +37,7 @@ fwpath = sys.argv[3] phytypes = phytypes.split(',') try: - corerevs = map(lambda r: int(r), corerevs.split(',')) + corerevs = [int(r) for r in corerevs.split(',')] except ValueError: print("ERROR: \"%s\" is not a valid COREREVS string\n" % corerevs) usage() @@ -45,7 +45,7 @@ except ValueError: fwfiles = os.listdir(fwpath) -fwfiles = filter(lambda str: str.endswith(".fw"), fwfiles) +fwfiles = [str for str in fwfiles if str.endswith(".fw")] if not fwfiles: print("ERROR: No firmware files found in %s" % fwpath) sys.exit(1)