diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-03-19 10:31:22 +0000 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-07-26 08:09:16 +0200 |
commit | 5989a75cc455e09b79fe6880ba6bae6f6332cd24 (patch) | |
tree | 7085d4f2321053e906368045a97538b7b060e671 /tools/b43-tools | |
parent | e9216b3336f7a774be7021dd663a433d9ec5edc7 (diff) | |
download | upstream-5989a75cc455e09b79fe6880ba6bae6f6332cd24.tar.gz upstream-5989a75cc455e09b79fe6880ba6bae6f6332cd24.tar.bz2 upstream-5989a75cc455e09b79fe6880ba6bae6f6332cd24.zip |
tools/b43-tools/b43-fwsquash: convert to Python 3 with 2-to-3
Let's convert the script to Python 3.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'tools/b43-tools')
-rwxr-xr-x | tools/b43-tools/files/b43-fwsquash.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |