From 5086d965655c3f9e48c5f65447c48c7771b81ba0 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Mon, 22 Jul 2013 11:16:19 +0100 Subject: 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). --- simplejenkinsapi/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.1