diff options
author | Damien George <damien@micropython.org> | 2024-03-25 13:36:30 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-03-25 13:41:37 +1100 |
commit | 51d05c442afca147d225f99fcec5f66b89b1c525 (patch) | |
tree | 5a3b3078f2d867fbef93fb6c9ce9f3852a9ee596 | |
parent | 086d4d127d2b85d8e04c73f7f54fc90c0a2e5c57 (diff) | |
download | micropython-51d05c442afca147d225f99fcec5f66b89b1c525.tar.gz micropython-51d05c442afca147d225f99fcec5f66b89b1c525.zip |
tools/manifestfile.py: Fix freeze() when script is an empty iterable.
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 #14125.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | tools/manifestfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/manifestfile.py b/tools/manifestfile.py index c1fc836585..beaa36d0f5 100644 --- a/tools/manifestfile.py +++ b/tools/manifestfile.py @@ -291,7 +291,7 @@ class ManifestFile: 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: |