Open AdityaGarg8 opened 4 months ago
I found a way to reproduce the issue. If a folder in the source_path has a "C" in its name, the error is seen:
aditya@fedora:~$ python3 firmware.sh '/tmp/tmp.Gy9UaW6UCjs/usr/share/firmware' fw.tar
Unhandled properties found: {'': '4377'} in file -4377__s-B3/P-fiji-ID_M-SPPR_V-m__m-2.1.txt
Traceback (most recent call last):
File "/home/aditya/firmware.sh", line 905, in <module>
wifi_col = WiFiFWCollection(sys.argv[1]+"/wifi")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aditya/firmware.sh", line 737, in __init__
self.load(source_path)
File "/home/aditya/firmware.sh", line 776, in load
assert not props
AssertionError
After the change in this PR, the bug seems to be fixed.
BTW, on macOS Sonoma, the wifi.py always failed for me ever since macOS Sonoma has been released. I got this log from there today:
aditya@fedora:~$ python3 firmware.sh '/run/media/aditya/macOS Base System/usr/share/firmware' fw.tar
Unhandled properties found: {'gen': 'ID'} in file C-4388__s-C0/java_gen-ID.clmb
Traceback (most recent call last):
File "/home/aditya/firmware.sh", line 907, in <module>
wifi_col = WiFiFWCollection(sys.argv[1]+"/wifi")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aditya/firmware.sh", line 739, in __init__
self.load(source_path)
File "/home/aditya/firmware.sh", line 778, in load
assert not props
AssertionError
Currently as a workaround I am making the script extract firmware for my model only.
Although the issue is something that happens once in a blue moon, probably because I use temporary directories to rename firmware on Linux, extracted from macOS Recovery Images.