refactor(): use `OSError` exception

https://docs.astral.sh/ruff/rules/os-error-alias/
This commit is contained in:
Rotzbua 2024-01-05 12:36:36 +01:00
parent 40e623b276
commit 42c481cb4a
No known key found for this signature in database
GPG Key ID: C69022D529C17845
1 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,6 @@ import functools
import hashlib
import logging
import mimetypes
import os
import time
from collections import defaultdict
from contextlib import suppress
@ -66,7 +65,7 @@ class FSFilesStore:
absolute_path = self._get_filesystem_path(path)
try:
last_modified = absolute_path.stat().st_mtime
except os.error:
except OSError:
return {}
with absolute_path.open("rb") as f: