Skip to content

Commit 0432f73

Browse files
committed
tools/mpy-tool.py: Fix static qstrs when freezing without qstr header.
It's rare to freeze .mpy files without specifying a qstr header from a firmware build, but it can be useful for testing, eg `mpy-tool.py -f test.mpy`. Fix this case so static qstrs are properly excluded from the frozen qstr list. Signed-off-by: Damien George <damien@micropython.org>
1 parent abe43fe commit 0432f73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/mpy-tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ def main():
17951795
else:
17961796
config.MICROPY_QSTR_BYTES_IN_LEN = 1
17971797
config.MICROPY_QSTR_BYTES_IN_HASH = 1
1798-
firmware_qstr_idents = set(qstrutil.static_qstr_list)
1798+
firmware_qstr_idents = set(qstrutil.static_qstr_list_ident)
17991799

18001800
# Create initial list of global qstrs.
18011801
global_qstrs = GlobalQStrList()

0 commit comments

Comments
 (0)