database: fix duplicated entries

This commit is contained in:
Solene Rapenne 2022-05-05 19:36:23 +02:00
parent 58f9d21b3d
commit 509055ca71
1 changed files with 27 additions and 24 deletions

View File

@ -9,9 +9,12 @@ def main():
conn = sqlite3.connect(database)
data = []
pkgs = dict()
with conn:
cursor = conn.execute("SELECT FULLPKGNAME, COMMENT, DESCR_CONTENTS, WANTLIB, RUN_DEPENDS FROM PortsQ")
for row in cursor:
if not pkgs.get(row[0]):
pkgs[row[0]] = True
gui = False
tui = False
if row[3]: