summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 22:49:35 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 22:49:35 +0200
commit2a945321cbc54c6acae73bc25d543e2af6f3e42b (patch)
tree5be26dec18cf822e57a9a25a0d45671d4dc29b15
parent0d877faef762319348b164dba98c159ac1ec4ecf (diff)
downloadportato-2a945321cbc54c6acae73bc25d543e2af6f3e42b.tar.gz
portato-2a945321cbc54c6acae73bc25d543e2af6f3e42b.tar.bz2
portato-2a945321cbc54c6acae73bc25d543e2af6f3e42b.zip
Use sets instead of lists --> faster results
Diffstat (limited to '')
-rw-r--r--portato/db/eix_sql.py2
-rw-r--r--portato/db/sql.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/portato/db/eix_sql.py b/portato/db/eix_sql.py
index ac31019..089d3ed 100644
--- a/portato/db/eix_sql.py
+++ b/portato/db/eix_sql.py
@@ -51,7 +51,7 @@ class EixSQLDatabase (SQLDatabase):
@SQLDatabase.con
def populate (self, category = None, connection = None):
- 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))
def _get():
with EixReader(self.cache) as eix:
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("/")