From 801316be64177d889ab21fc28c07dd4d77cb8184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 14 Aug 2009 19:42:01 +0200 Subject: Fix the EixSQLDatabase and EixReader --- portato/db/sql.py | 1 + 1 file changed, 1 insertion(+) (limited to 'portato/db/sql.py') diff --git a/portato/db/sql.py b/portato/db/sql.py index 6c95bb3..f2a736e 100644 --- a/portato/db/sql.py +++ b/portato/db/sql.py @@ -256,3 +256,4 @@ class SQLDatabase (Database): self._restrict = "AND (name LIKE '%%%(restrict)s%%' OR cat LIKE '%(restrict)s%%')" % {"restrict":restrict} restrict = property(get_restrict, set_restrict) + con = staticmethod(con) -- cgit v1.2.3 From 2a945321cbc54c6acae73bc25d543e2af6f3e42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 14 Aug 2009 22:49:35 +0200 Subject: Use sets instead of lists --> faster results --- portato/db/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'portato/db/sql.py') diff --git a/portato/db/sql.py b/portato/db/sql.py index f2a736e..415df92 100644 --- a/portato/db/sql.py +++ b/portato/db/sql.py @@ -175,7 +175,7 @@ class SQLDatabase (Database): def populate (self, category = None, connection = None): def _get(): # get the lists - inst = system.find_packages(pkgSet = system.SET_INSTALLED, key=category, with_version = False) + inst = set(system.find_packages(pkgSet = system.SET_INSTALLED, key=category, with_version = False)) for p in system.find_packages(key = category, with_version = False): cat, pkg = p.split("/") -- cgit v1.2.3