Skip to content

Commit 82d7661

Browse files
authored
fix: check commit_sha is not None before logging (#687)
1 parent 5df9a8b commit 82d7661

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codegen/runner/servers/local_daemon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ async def run(request: RunFunctionRequest) -> CodemodRunResult:
7878
diff_req = GetDiffRequest(codemod=Codemod(user_code=request.codemod_source))
7979
diff_response = await runner.get_diff(request=diff_req)
8080
if request.commit:
81-
commit_sha = runner.codebase.git_commit(f"[Codegen] {request.function_name}")
82-
logger.info(f"Committed changes to {commit_sha.hexsha}")
81+
if commit_sha := runner.codebase.git_commit(f"[Codegen] {request.function_name}"):
82+
logger.info(f"Committed changes to {commit_sha.hexsha}")
8383
return diff_response.result

0 commit comments

Comments
 (0)