Scrapy, a fast high-level web crawling & scraping framework for Python.
refactor(): use `OSError` exception
Rotzbua42c481cb4a12
diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.pyindex 1990ba825..73064ad10 100644--- a/scrapy/pipelines/files.py+++ b/scrapy/pipelines/files.py@@ -8,7 +8,6 @@ import functoolsimport hashlibimport loggingimport mimetypes-import osimport timefrom collections import defaultdictfrom 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: