Merge pull request #6198 from Rotzbua/refactor_exception

refactor(): use `OSError` exception
This commit is contained in:
Mikhail Korobov 2024-01-12 00:32:51 +05:00 committed by GitHub
commit 825137399d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: