Skip to content

Commit

Permalink
Merge pull request #309 from shoeffner/response-ok
Browse files Browse the repository at this point in the history
Replace `response.ok` with `response.status_code < 400`
  • Loading branch information
mih authored Jul 19, 2024
2 parents 7d7d514 + 317162d commit 3161150
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datalad_dataverse/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, api, dsid: str, root_path: str | None = None):
# check if project with specified doi exists
# TODO ask for ':latest' and cache?
dv_ds = api.get_dataset(identifier=dsid)
if not dv_ds.ok:
if not dv_ds.status_code < 400:
raise RuntimeError("Cannot find dataset")

def get_fileid_from_path(
Expand Down

0 comments on commit 3161150

Please sign in to comment.