[mlpack-svn] r15784 - mlpack/conf/jenkins-conf/benchmark/util

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Sat Sep 14 09:48:14 EDT 2013


Author: marcus
Date: Sat Sep 14 09:48:13 2013
New Revision: 15784

Log:
Catch exception if there is no database available.

Modified:
   mlpack/conf/jenkins-conf/benchmark/util/database.py

Modified: mlpack/conf/jenkins-conf/benchmark/util/database.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/util/database.py	(original)
+++ mlpack/conf/jenkins-conf/benchmark/util/database.py	Sat Sep 14 09:48:13 2013
@@ -286,7 +286,12 @@
   @return The sum of the time column if there are records otherwise None.
   '''
   def GetResultsSum(self, name):
-    libaryId = self.GetLibrary(name)[0][0]
+    libaryId = self.GetLibrary(name)
+    if libaryId:
+      libaryId = libaryId[0][0]
+    else:
+      return None
+      
     with self.con:
       self.cur.execute("SELECT id FROM builds WHERE libary_id=" + str(libaryId) 
           + " ORDER BY build ASC")



More information about the mlpack-svn mailing list