Skip to content

Commit 62119b6

Browse files
Address review: add clarifying comments for returncode and sig normalization
Agent-Logs-Url: https://github.com/codeSamuraii/pyfuse/sessions/50af12cc-7049-4c63-b673-b2a63099b2d2 Co-authored-by: codeSamuraii <17270548+codeSamuraii@users.noreply.github.com>
1 parent 89ef8f8 commit 62119b6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

pyfuse/core/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,5 @@ def from_json(
185185
timeout=data.get("timeout"),
186186
retries=data.get("retries", 0),
187187
retry_delay=data.get("retry_delay", 1.0),
188-
signature=sig or None,
188+
signature=sig or None, # normalise empty string to None
189189
)

pyfuse/worker/deps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ async def _pip_install(package: str, extra_args: list[str]) -> tuple[int, str, s
9696
stderr=asyncio.subprocess.PIPE,
9797
)
9898
stdout_bytes, stderr_bytes = await proc.communicate()
99+
# returncode is None if the process hasn't terminated; treat as failure
99100
returncode = proc.returncode if proc.returncode is not None else 1
100101
return (
101102
returncode,

0 commit comments

Comments
 (0)