Name the cause when an OSError has no strerror
This commit is contained in:
@@ -46,5 +46,5 @@ def delete_session(session: Session) -> Failure | None:
|
|||||||
try:
|
try:
|
||||||
shutil.rmtree(sibling) if os.path.isdir(sibling) else os.remove(sibling)
|
shutil.rmtree(sibling) if os.path.isdir(sibling) else os.remove(sibling)
|
||||||
except OSError as failure:
|
except OSError as failure:
|
||||||
return Failure(f"could not delete {sibling}: {failure.strerror}; delete {stem}* and rerun loop-claude, or the next chunk resumes the finished chunk's session")
|
return Failure(f"could not delete {sibling}: {failure.strerror or failure}; delete {stem}* and rerun loop-claude, or the next chunk resumes the finished chunk's session")
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user