Fix MACOS Zip Import Error when compressing plugin (#3629)

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
This commit is contained in:
gravelBridge
2023-05-01 20:49:44 -07:00
committed by GitHub
parent 1d26f6b697
commit 2e9c80a486

View File

@@ -33,7 +33,7 @@ def inspect_zip_for_modules(zip_path: str, debug: bool = False) -> list[str]:
result = [] result = []
with zipfile.ZipFile(zip_path, "r") as zfile: with zipfile.ZipFile(zip_path, "r") as zfile:
for name in zfile.namelist(): for name in zfile.namelist():
if name.endswith("__init__.py"): if name.endswith("__init__.py") and not name.startswith("__MACOSX"):
logger.debug(f"Found module '{name}' in the zipfile at: {name}") logger.debug(f"Found module '{name}' in the zipfile at: {name}")
result.append(name) result.append(name)
if len(result) == 0: if len(result) == 0: