From 815e07771b96b1899ffdcda56e8c5c9aad487a90 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 26 Dec 2005 18:23:57 +0000 Subject: [PATCH] prevent a tb --- src/common/logger.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/logger.py b/src/common/logger.py index 1391929e9..0d36c2aa9 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -402,5 +402,11 @@ class Logger: AND kind NOT IN (?, ?) ORDER BY time DESC LIMIT 1 ''', (jid_id, constants.KIND_STATUS, constants.KIND_GCSTATUS)) - result = self.cur.fetchone()[0] + + results = self.cur.fetchone() + if len(results) > 0: + result = results[0] + else: + result = None + return result