[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] suite_id



if suite doesnt exist dont try to convert a None to int, python doesnt
like this.

Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 daklib/dbconn.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/daklib/dbconn.py b/daklib/dbconn.py
index b291372..58dd7fc 100755
--- a/daklib/dbconn.py
+++ b/daklib/dbconn.py
@@ -168,7 +168,11 @@ class DBConn(Singleton):
         @return: the database id for the given suite
 
         """
-        return int(self.__get_id('id', 'suite', 'suite_name', suite))
+        suiteid = self.__get_id('id', 'suite', 'suite_name', suite)
+        if suiteid is None:
+            return None
+        else:
+            return int(suiteid)
 
     def get_section_id(self, section):
         """
-- 
1.5.6.5


Reply to: