From 6a3607f84d9e53241218d089b4de3c03e08719a2 Mon Sep 17 00:00:00 2001 From: salimfadhley Date: Sun, 6 Oct 2013 22:33:22 +0100 Subject: [PATCH] Try to be consistent about what type is returned --- jenkinsapi/build.py | 8 ++++---- license.txt | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jenkinsapi/build.py b/jenkinsapi/build.py index 9e082f1..221e079 100644 --- a/jenkinsapi/build.py +++ b/jenkinsapi/build.py @@ -28,7 +28,7 @@ class Build(JenkinsBase): self.buildno = buildno self.job = job JenkinsBase.__init__( self, url ) - + def _poll(self): #For build's we need more information for downstream and upstream builds #so we override the poll to get at the extra data for build objects @@ -177,7 +177,7 @@ class Build(JenkinsBase): downstream_jobs.append(self.get_jenkins_obj().get_job(job_name)) return downstream_jobs except (IndexError, KeyError): - return None + return [] def get_downstream_job_names(self): """ @@ -194,7 +194,7 @@ class Build(JenkinsBase): downstream_names.append(job_usage['name']) return downstream_names except (IndexError, KeyError): - return None + return [] def get_downstream_builds(self): """ @@ -215,7 +215,7 @@ class Build(JenkinsBase): downstream_builds.append(job.get_build(build_id)) return downstream_builds except (IndexError, KeyError): - return None + return [] def get_matrix_runs(self): """ diff --git a/license.txt b/license.txt index c41ff1c..6d28738 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,5 @@ Copyright (c) 2012 Salim Fadhley +For additional contributors please see the README.rst file The MIT License (MIT) @@ -8,4 +9,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- 2.34.1