mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-11 02:33:41 +08:00
handle transient sysfs read errors (#38521)
handle transient USB sysfs read error
This commit is contained in:
@@ -22,7 +22,7 @@ def read(path: Path) -> str | None:
|
||||
def read_int(path: Path, base: int = 10) -> int:
|
||||
try:
|
||||
return int(path.read_text(), base)
|
||||
except (OSError, ValueError):
|
||||
except (OSError, ValueError, TypeError):
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user