Skip to content

Commit c7ae74b

Browse files
committed
fix missing openocd crash
1 parent 79ca201 commit c7ae74b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎robot_orchestrator/firmware/openocd.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def flash(self, image_path: Path, attempt: int) -> FlashResult:
4040
result = self.runner(argv, self.config.timeout_s)
4141
except subprocess.TimeoutExpired:
4242
return FlashResult(ok=False, detail=f"openocd timed out after {self.config.timeout_s}s")
43+
except OSError as e:
44+
return FlashResult(ok=False, detail=str(e))
4345

4446
if result.returncode == 0:
4547
return FlashResult(ok=True)

‎robot_orchestrator/hal/real/usb.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ def target_present(self) -> bool:
8686
]
8787
try:
8888
result = self.runner(argv, 5.0)
89-
except subprocess.TimeoutExpired:
89+
except (subprocess.TimeoutExpired, OSError):
9090
return False
9191
return result.returncode == 0

0 commit comments

Comments
 (0)