Skip to content

Commit

Permalink
Merge pull request #92 from martindurant/new_google_message
Browse files Browse the repository at this point in the history
Fixes pangeo-data/pangeo #176
  • Loading branch information
martindurant authored Mar 22, 2018
2 parents 59c43e3 + 90b1b8f commit 2fbdc27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gcsfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def validate_response(r, path):
except:
msg = str(r.content)

if "Not Found" in m:
if r.status_code == 404:
raise FileNotFoundError(path)
elif "forbidden" in m:
elif r.status_code == 403:
raise IOError("Forbidden: %s\n%s" % (path, msg))
elif "invalid" in m:
raise ValueError("Bad Request: %s\n%s" % (path, msg))
Expand Down

0 comments on commit 2fbdc27

Please sign in to comment.