From 87db5d0dab7e25f7e42f7997b71edb0a3663b0c3 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 15 Feb 2013 00:53:05 +0000 Subject: [PATCH] minor bug fix to avoid duplicates - #297 --- lib/utils/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/api.py b/lib/utils/api.py index e7a0e96f0..db93f74b5 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -190,15 +190,15 @@ class StdDbOut(object): # Ignore all non-relevant messages return - #print >>sys.__stdout__, "value: %s\nstatus: %d\ncontent_type: %d\nkb.partRun: %s\n--------------" % (value, status, content_type, kb.partRun) - output = conf.database_cursor.execute("SELECT id, status, value FROM data WHERE taskid = ? AND content_type = ?", (self.taskid, content_type)) + #print >>sys.__stdout__, "output: %s\nvalue: %s\nstatus: %d\ncontent_type: %d\nkb.partRun: %s\n--------------" % (output, value, status, content_type, kb.partRun) + # Delete partial output from IPC database if we have got a complete output if status == CONTENT_STATUS.COMPLETE: if len(output) > 0: - for index in xrange(0, len(output)-1): + for index in xrange(0, len(output)): if output[index][1] == CONTENT_STATUS.COMPLETE: insert = False else: