summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-07-22 11:16:19 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2013-07-22 11:16:19 +0100
commit5086d965655c3f9e48c5f65447c48c7771b81ba0 (patch)
tree65723de60da04a593f77765f012fff1dd0d34369
parent4006673b79c876e6b13c0b3630351b6c8278a418 (diff)
downloadjenkinstool-5086d965655c3f9e48c5f65447c48c7771b81ba0.tar.gz
simplejenkinsapi: Be more permissive of return code
Recently Jenkins changed its api for build triggering so that it would return 201 (CREATED) when a build is triggered, instead of 200 (OK).
-rw-r--r--simplejenkinsapi/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/simplejenkinsapi/api.py b/simplejenkinsapi/api.py
index 9c6c66b..a2f616d 100644
--- a/simplejenkinsapi/api.py
+++ b/simplejenkinsapi/api.py
@@ -78,7 +78,7 @@ class Jenkins(object):
logging.debug('HTTP reason: %s' % resp.reason)
logging.debug('HTTP text: %s' % repr(text))
- ok = [httplib.OK, httplib.FOUND]
+ ok = [httplib.OK, httplib.CREATED, httplib.FOUND]
if resp.status not in ok: # pragma: no cover
raise httplib.HTTPException('Error %d (%s) from server:\n%s' %
(resp.status, resp.reason, text))