Skip to content

Commit

Permalink
fix travis ci error gdcc#8
Browse files Browse the repository at this point in the history
  • Loading branch information
skasberger committed May 20, 2019
1 parent b2a5679 commit a68febc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pyDataverse/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ def create_dataverse(self, identifier, metadata, auth=True,
required. http://guides.dataverse.org/en/latest/
_downloads/dataverse-complete.json
RESPONSES:
resp.status_code:
200: dataverse created
201: dataverse created
Parameters
----------
Expand Down Expand Up @@ -350,7 +352,7 @@ def create_dataverse(self, identifier, metadata, auth=True,
raise DataverseNotFoundError(
'ERROR: HTTP 404 - Dataverse {0} was not found. MSG: '.format(
parent, error_msg))
elif resp.status_code != 201:
elif resp.status_code != 200 and resp.status_code != 201:
error_msg = resp.json()['message']
raise OperationFailedError(
'ERROR: HTTP {0} - Dataverse {1} could not be created. '
Expand Down

0 comments on commit a68febc

Please sign in to comment.