Catch OS error (#15590)

This commit is contained in:
Nicolas Mowen 2024-12-18 17:45:08 -06:00 committed by GitHub
parent 3dc26e78ef
commit b149828c9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -293,7 +293,7 @@ def stats_snapshot(
for path in [RECORD_DIR, CLIPS_DIR, CACHE_DIR, "/dev/shm"]: for path in [RECORD_DIR, CLIPS_DIR, CACHE_DIR, "/dev/shm"]:
try: try:
storage_stats = shutil.disk_usage(path) storage_stats = shutil.disk_usage(path)
except FileNotFoundError: except (FileNotFoundError, OSError):
stats["service"]["storage"][path] = {} stats["service"]["storage"][path] = {}
continue continue