mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-23 17:04:21 +01:00
Fix MACOS Zip Import Error when compressing plugin (#3629)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user