From b07821f6a36df28f7ddbda33348fefb3d985003d Mon Sep 17 00:00:00 2001 From: tracedeng <56997132@qq.com> Date: Thu, 24 Sep 2020 18:03:55 +0800 Subject: [PATCH] fix bug: import jenkins error --- src/proxy/jenkins_proxy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proxy/jenkins_proxy.py b/src/proxy/jenkins_proxy.py index ea4bf73..63fd8ef 100644 --- a/src/proxy/jenkins_proxy.py +++ b/src/proxy/jenkins_proxy.py @@ -20,7 +20,7 @@ import logging import re # not friendly when job in folders -import jenkinsapi.jenkins.Jenkins as Jenkins +import jenkinsapi.jenkins as jenkins import src.proxy.jenkins_patch logger = logging.getLogger("common") @@ -41,7 +41,7 @@ class JenkinsProxy(object): self._username = username self._token = token self._timeout = timeout - self._jenkins = Jenkins(base_url, username=username, password=token, timeout=timeout) + self._jenkins = jenkins.Jenkins(base_url, username=username, password=token, timeout=timeout) def create_job(self, job, config): """ @@ -130,7 +130,7 @@ class JenkinsProxy(object): logger.debug("base url {}".format(base_url)) try: - j = Jenkins(base_url, self._username, self._token, timeout=self._timeout) + j = jenkins.Jenkins(base_url, self._username, self._token, timeout=self._timeout) jobs.append(j[name]) except Exception as e: logger.exception("get job of {} exception".format(url)) -- Gitee