]> git.decadent.org.uk Git - dak.git/commitdiff
suite_id
authorJoerg Jaspert <joerg@debian.org>
Tue, 28 Apr 2009 20:02:05 +0000 (22:02 +0200)
committerJoerg Jaspert <joerg@debian.org>
Tue, 28 Apr 2009 20:02:05 +0000 (22:02 +0200)
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

index b29137221672d7f698fd7459a1f12c0a2ff1c630..58dd7fc55520c09bda083d6ca51ec9536f28f971 100755 (executable)
@@ -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):
         """