mirror of
https://github.com/W3SLAV/micropython.git
synced 2025-06-19 12:05:32 -04:00
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>
This commit is contained in:
parent
086d4d127d
commit
51d05c442a
@ -291,7 +291,7 @@ class ManifestFile:
|
|||||||
def _search(self, base_path, package_path, files, exts, kind, opt=None, strict=False):
|
def _search(self, base_path, package_path, files, exts, kind, opt=None, strict=False):
|
||||||
base_path = self._resolve_path(base_path)
|
base_path = self._resolve_path(base_path)
|
||||||
|
|
||||||
if files:
|
if files is not None:
|
||||||
# Use explicit list of files (relative to package_path).
|
# Use explicit list of files (relative to package_path).
|
||||||
for file in files:
|
for file in files:
|
||||||
if package_path:
|
if package_path:
|
||||||
|
Loading…
Reference in New Issue
Block a user