From: William Zhang Date: Fri, 11 May 2012 08:10:10 +0000 (+0800) Subject: copy job return job obj X-Git-Tag: v0.2.23~295^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b03987e0a8fa7d2246e8b5a5e0080a475177af34;p=tools%2Fpython-jenkinsapi.git copy job return job obj --- diff --git a/jenkinsapi/jenkins.py b/jenkinsapi/jenkins.py index 7956390..d071f9f 100644 --- a/jenkinsapi/jenkins.py +++ b/jenkinsapi/jenkins.py @@ -106,14 +106,14 @@ class Jenkins(JenkinsBase): """ copy_job_url = "%screateItem?name=%s&mode=copy&from=%s" % (self.baseurl, newjobname, jobname) self.post_data(copy_job_url, '') - return self[newjobname] + return Jenkins(self.baseurl).get_job(newjobname) def delete_job(self, jobname): """ Delete a job by name :param jobname: name of a exist job, str """ - delete_job_url = "%sdoDelete" % self.[jobname].baseurl + delete_job_url = "%sdoDelete" % self[jobname].baseurl self.post_data(delete_job_url, '') return self