From cc53effc5d93836b818fe23ba17ee5aa374365d5 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Tue, 28 Apr 2009 22:02:05 +0200 Subject: [PATCH] suite_id if suite doesnt exist dont try to convert a None to int, python doesnt like this. Signed-off-by: Joerg Jaspert --- daklib/dbconn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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): """ -- 2.39.5