Fix the accept_status code for create_gerrit_branch

- gerrit create branch endpoint returns code 201 instead of 200

Bug:
R=agable

Change-Id: I07697e87e506d5545e9abd501775e0fc30a48f80
Reviewed-on: https://chromium-review.googlesource.com/482522
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Di Mu <dimu@chromium.org>
changes/22/482522/3
dimu 8 years ago committed by Commit Bot
parent c9432d7168
commit 7d1af2b930

@ -776,7 +776,7 @@ def CreateGerritBranch(host, project, branch, commit):
path = 'projects/%s/branches/%s' % (project, branch)
body = {'revision': commit}
conn = CreateHttpConn(host, path, reqtype='PUT', body=body)
response = ReadHttpJsonResponse(conn)
response = ReadHttpJsonResponse(conn, accept_statuses=[201])
if response:
return response
raise GerritError(200, 'Unable to create gerrit branch')

Loading…
Cancel
Save