From 9dbbb33eaabf0b94782d9d9fd931f01d8c4c5cd5 Mon Sep 17 00:00:00 2001 From: lxnay Date: Mon, 16 Feb 2009 18:27:22 +0000 Subject: [PATCH] Entropy/EntropyDatabaseInterface: - fix areIDPackagesAvailable method git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3035 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index bcea22d1a..73a25e15f 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -33200,7 +33200,8 @@ class EntropyDatabaseInterface: return True def areIDPackagesAvailable(self, idpackages): - self.cursor.execute('SELECT count(idpackage) FROM baseinfo WHERE idpackage IN %s' % (tuple(idpackages),) ) + sql = 'SELECT count(idpackage) FROM baseinfo WHERE idpackage IN (%s)' % (','.join([str(x) for x in set(idpackages)]),) + self.cursor.execute(sql) count = self.cursor.fetchone()[0] if count != len(idpackages): return False