Skip to contentSkip to conversation

toaster: last build id call

PATCH New David Reyna 1 participant 2 messages Jun 15, 2017

lore
Share & tools
lore
#0 lore raw

cover toaster: last build id call

From: David Reyna <[email protected]>

Many calls to "get_last_build_id" were missing the "()" in several calls, and were previously failing silently.

The following changes since commit 6964efddd31c479386d1643c1025bc102710392f:

bitbake: cooker: ensure graceful exit after exception during BuildCompleted handler (2017-06-14 14:54:25 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib dreyna/submit/bdreyna/toaster/get_last_build_id_11570
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=dreyna/submit/bdreyna/toaster/get_last_build_id_11570

David Reyna (1):
toaster: get_last_build_id not called correctly

 lib/toaster/orm/models.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 toaster: get_last_build_id not called correctly

From: David Reyna <[email protected]>

The method "get_last_build_id" missing the "()" in several calls. This has been failing silently with Django 1.8 but intermittently crash with Django 1.9.

[YOCTO #11570]

---
 lib/toaster/orm/models.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
lib/toaster/orm/models.py +6 -6
index 6c5cfcd..a49f9a4 100644
@@ -225,16 +225,16 @@ class Project(models.Model):
             return( -1 )
 
     def get_last_outcome(self):
-        build_id = self.get_last_build_id
+        build_id = self.get_last_build_id()
         if (-1 == build_id):
             return( "" )
         try:
-            return Build.objects.filter( id = self.get_last_build_id )[ 0 ].outcome
+            return Build.objects.filter( id = build_id )[ 0 ].outcome
         except (Build.DoesNotExist,IndexError):
             return( "not_found" )
 
     def get_last_target(self):
-        build_id = self.get_last_build_id
+        build_id = self.get_last_build_id()
         if (-1 == build_id):
             return( "" )
         try:
@@ -243,7 +243,7 @@ class Project(models.Model):
             return( "not_found" )
 
     def get_last_errors(self):
-        build_id = self.get_last_build_id
+        build_id = self.get_last_build_id()
         if (-1 == build_id):
             return( 0 )
         try:
@@ -252,7 +252,7 @@ class Project(models.Model):
             return( "not_found" )
 
     def get_last_warnings(self):
-        build_id = self.get_last_build_id
+        build_id = self.get_last_build_id()
         if (-1 == build_id):
             return( 0 )
         try:
@@ -269,7 +269,7 @@ class Project(models.Model):
         return last_build.get_image_file_extensions()
 
     def get_last_imgfiles(self):
-        build_id = self.get_last_build_id
+        build_id = self.get_last_build_id()
         if (-1 == build_id):
             return( "" )
         try:
Signature · 1 line
1.9.1