Try to be consistent about what type is returned
authorsalimfadhley <sal@stodge.org>
Sun, 6 Oct 2013 21:33:22 +0000 (22:33 +0100)
committersalimfadhley <sal@stodge.org>
Sun, 6 Oct 2013 21:33:22 +0000 (22:33 +0100)
jenkinsapi/build.py
license.txt

index 9e082f1c694181b09d4dda3c26add80edf74b224..221e079b44632b510a5caabf1830c5a0016773c0 100644 (file)
@@ -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):
         """
index c41ff1c54d9ee372681feebe5679fedb9af00127..6d287385700971db10472f53ed86842519ca86b0 100644 (file)
@@ -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.