Skip to content

Commit

Permalink
tools/manifestfile.py: Fix freeze() when script is an empty iterable.
Browse files Browse the repository at this point in the history
The documentation for `freeze()` says that:
- If `script` is `None`, all files in `path` will be frozen.
- If `script` is an iterable then `freeze()` is called on all items of the
  iterable.

This commit makes sure this behaviour is followed when an empty tuple/list
is passed in for `script` (previously an empty tuple/list froze all files).

Fixes issue micropython#14125.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Mar 25, 2024
1 parent 086d4d1 commit 51d05c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/manifestfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def _add_file(self, full_path, target_path, kind=KIND_AUTO, opt=None):
def _search(self, base_path, package_path, files, exts, kind, opt=None, strict=False):
base_path = self._resolve_path(base_path)

if files:
if files is not None:
# Use explicit list of files (relative to package_path).
for file in files:
if package_path:
Expand Down

0 comments on commit 51d05c4

Please sign in to comment.