handle transient sysfs read errors (#38521)

handle transient USB sysfs read error
This commit is contained in:
Daniel Koepping
2026-08-03 16:49:01 -07:00
committed by GitHub
parent afa2b390ae
commit 7ef4304e2e
+1 -1
View File
@@ -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