8000 Fix ProjectBuild.play raises error on success · DavidGarfinkle/python-gitlab@0793271 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0793271

Browse files
authored
Fix ProjectBuild.play raises error on success
Running play on ProjectBuild raises a GitlabBuildPlayError although the request was successful. It looks like gitlab returns a 200-OK instead of 201-CREATED response and as such always raises an exception.
1 parent 945cc66 commit 0793271

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitlab/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def play(self, **kwargs):
965965
"""Trigger a build explicitly."""
966966
url = '/projects/%s/builds/%s/play' % (self.project_id, self.id)
967967
r = self.gitlab._raw_post(url)
968-
raise_error_from_response(r, GitlabBuildPlayError, 201)
968+
raise_error_from_response(r, GitlabBuildPlayError)
969969

970970
def erase(self, **kwargs):
971971
"""Erase the build (remove build artifacts and trace)."""

0 commit comments

Comments
 (0)
0