We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54e8faa commit d97099aCopy full SHA for d97099a
gcsfs/core.py
@@ -1622,7 +1622,7 @@ async def _get_file_request(
1622
headers=self._get_headers(headers),
1623
timeout=self.requests_timeout,
1624
) as r:
1625
- r.raise_for_status()
+ validate_response(r.status, None, rpath)
1626
try:
1627
size = int(r.headers["content-length"])
1628
except (KeyError, ValueError):
gcsfs/tests/test_core.py
@@ -1697,3 +1697,8 @@ def test_near_find(gcs):
1697
gcs.touch(f"{TEST_BUCKET}/inner/aa/file")
1698
out = gcs.find(f"{TEST_BUCKET}/inner/a")
1699
assert not out
1700
+
1701
1702
+def test_get_error(gcs):
1703
+ with pytest.raises(FileNotFoundError):
1704
+ gcs.get_file(f"{TEST_BUCKET}/doesnotexist", "other")
0 commit comments