diff --git a/library.py b/library.py index 26ee417..b240f1b 100644 --- a/library.py +++ b/library.py @@ -530,7 +530,7 @@ def download(self): self.logger.debug("Indexing parts table...") wx.PostEvent(self.parent, UpdateGaugeEvent(value=0)) with contextlib.closing(sqlite3.connect(self.partsdb_file)) as con: - con.execute('DROP TABLE parts_by_lcsc;') + con.execute('DROP TABLE IF EXISTS parts_by_lcsc;') con.execute('CREATE TABLE IF NOT EXISTS parts_by_lcsc (partsId INTEGER, lcsc TEXT);') con.execute('DROP INDEX IF EXISTS LCSCpartIdx;') cur = con.execute('SELECT rowid, `LCSC Part` FROM parts')