summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorhakkeroid <hakkeroid@users.noreply.github.com>2016-10-17 13:21:21 +0200
committerGitHub <noreply@github.com>2016-10-17 13:21:21 +0200
commit079327141d3701699d98c03a71d9ad77215dd73c (patch)
treefd6ac4fbebc8c872c7c3bc462bc1a1b960e78b1c /gitlab/objects.py
parent945cc66b387599e572fc4f2eaea9ba7095b64b8e (diff)
downloadgitlab-079327141d3701699d98c03a71d9ad77215dd73c.tar.gz
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.
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index e61483a..d7688d0 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -965,7 +965,7 @@ class ProjectBuild(GitlabObject):
"""Trigger a build explicitly."""
url = '/projects/%s/builds/%s/play' % (self.project_id, self.id)
r = self.gitlab._raw_post(url)
- raise_error_from_response(r, GitlabBuildPlayError, 201)
+ raise_error_from_response(r, GitlabBuildPlayError)
def erase(self, **kwargs):
"""Erase the build (remove build artifacts and trace)."""