mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
Merge branch 'fixbug/mgx-46' into 'mgx_ops'
fixbug: MGX-46 See merge request pub/MetaGPT!143
This commit is contained in:
commit
f37b12a8ec
2 changed files with 8 additions and 1 deletions
|
|
@ -496,7 +496,9 @@ class Engineer(Role):
|
|||
filename = Path(i)
|
||||
if filename.suffix != ".py":
|
||||
continue
|
||||
workdir = self.repo.srcs.workdir / filename.parent
|
||||
workdir = self.src_workspace / filename.parent
|
||||
if not workdir.exists():
|
||||
workdir = self.project_repo.workdir / filename.parent
|
||||
await init_python_folder(workdir)
|
||||
|
||||
async def _is_fixbug(self) -> bool:
|
||||
|
|
|
|||
|
|
@ -896,6 +896,11 @@ def get_project_srcs_path(workdir: str | Path) -> Path:
|
|||
|
||||
|
||||
async def init_python_folder(workdir: str | Path):
|
||||
if not workdir:
|
||||
return
|
||||
workdir = Path(workdir)
|
||||
if not workdir.exists():
|
||||
return
|
||||
init_filename = Path(workdir) / "__init__.py"
|
||||
if init_filename.exists():
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue