From 8737d51fee92df3c95644c2e9a15ee9a918d93c4 Mon Sep 17 00:00:00 2001 From: lockerzhang Date: Tue, 23 Apr 2019 21:43:00 +0800 Subject: [PATCH] fix copy job [no content-type header set] bug --- jenkins/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/__init__.py b/jenkins/__init__.py index 9717f58..97d3f64 100755 --- a/jenkins/__init__.py +++ b/jenkins/__init__.py @@ -1065,7 +1065,7 @@ def copy_job(self, from_name, to_name): 'folder must be the same' % (from_name, to_name)) self.jenkins_open(requests.Request( - 'POST', self._build_url(COPY_JOB, locals()) + 'POST', self._build_url(COPY_JOB, locals()), headers={'Content-Type': 'multipart/form-data'} )) self.assert_job_exists(to_name, 'create[%s] failed')