diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-07-22 11:16:19 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-07-22 11:16:19 +0100 |
commit | 5086d965655c3f9e48c5f65447c48c7771b81ba0 (patch) | |
tree | 65723de60da04a593f77765f012fff1dd0d34369 /simplejenkinsapi | |
parent | 4006673b79c876e6b13c0b3630351b6c8278a418 (diff) | |
download | jenkinstool-5086d965655c3f9e48c5f65447c48c7771b81ba0.tar.gz |
simplejenkinsapi: Be more permissive of return codebaserock/richardmaw/S8436/jenkins-api-change-fix
Recently Jenkins changed its api for build triggering so that
it would return 201 (CREATED) when a build is triggered, instead
of 200 (OK).
Diffstat (limited to 'simplejenkinsapi')
-rw-r--r-- | simplejenkinsapi/api.py | 2 |
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)) |