Commit 7d1af2b9 authored by dimu's avatar dimu Committed by Commit Bot

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/482522Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Di Mu <dimu@chromium.org>
parent c9432d71
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment