diff options
author | Daniel Watkins <daniel.watkins@canonical.com> | 2017-07-27 12:33:54 -0400 |
---|---|---|
committer | Daniel Watkins <daniel.watkins@canonical.com> | 2017-07-31 09:53:12 -0400 |
commit | cc200dade01d32e53537b2071403de8538fd5344 (patch) | |
tree | 51b77ac12d3b5512e7a8513170581c6438f2de44 /jenkins_jobs/builder.py | |
parent | 8d3d915aa02e0953919bc02d3ce1cab8470ab2b9 (diff) | |
download | python-jenkins-job-builder-cc200dade01d32e53537b2071403de8538fd5344.tar.gz python-jenkins-job-builder-cc200dade01d32e53537b2071403de8538fd5344.tar.xz python-jenkins-job-builder-cc200dade01d32e53537b2071403de8538fd5344.zip |
Use default plugin list when listing Forbidden
Listing the plugins installed on a Jenkins instance requires full
administrative permissions. For cases where we don't have permission to
read the plugin list, we should just fall back to the default list.
Story: 2000618
Task: 3052
Change-Id: I924f237f5f175216200668d133092f2357f6d9d3
Diffstat (limited to 'jenkins_jobs/builder.py')
-rw-r--r-- | jenkins_jobs/builder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jenkins_jobs/builder.py b/jenkins_jobs/builder.py index 10783fa8..1aea1e2f 100644 --- a/jenkins_jobs/builder.py +++ b/jenkins_jobs/builder.py @@ -112,7 +112,7 @@ class JenkinsManager(object): plugins_list = self.jenkins.get_plugins().values() except jenkins.JenkinsException as e: - if re.search("Connection refused", str(e)): + if re.search("(Connection refused|Forbidden)", str(e)): logger.warning( "Unable to retrieve Jenkins Plugin Info from {0}," " using default empty plugins info list.".format( |