From: Joerg Jaspert Date: Tue, 28 Apr 2009 20:02:05 +0000 (+0200) Subject: suite_id X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc53effc5d93836b818fe23ba17ee5aa374365d5;p=dak suite_id if suite doesnt exist dont try to convert a None to int, python doesnt like this. Signed-off-by: Joerg Jaspert --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index b2913722..58dd7fc5 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): """