From: Michael Rasmussen Date: Mon, 15 Apr 2024 16:53:20 +0000 (+0200) Subject: Clean up code X-Git-Url: http://git.datanom.net/lensdatabase.git/commitdiff_plain/376dc649df68df57869e5f5a02d0cd263254bbde?ds=inline;hp=29f0e748a8cd062a091bc4cca710fa91f720c11c Clean up code --- diff --git a/db.py b/db.py index b285ff2..0fa2839 100644 --- a/db.py +++ b/db.py @@ -113,7 +113,6 @@ class DB: lensmaker = cur.fetchone() else: lensmaker = (maker, ) - #cur.execute("select sn, description, notes, id from lens where maker = ?", lensmaker) cur.execute(sql, lensmaker) rows = cur. fetchall() return rows @@ -130,7 +129,6 @@ class DB: lensmaker = cur.fetchone() else: lensmaker = (maker, ) - #cur.execute("select sn, description, notes, id from lens where description like ? and maker = ? COLLATE NOCASE", ('%'+pattern+'%', ) + lensmaker) cur.execute(sql, ('%'+pattern+'%', ) + lensmaker) rows = cur. fetchall() return rows diff --git a/searchwindow.py b/searchwindow.py index 6ef2785..d2e8e72 100644 --- a/searchwindow.py +++ b/searchwindow.py @@ -40,10 +40,6 @@ class SearchResultDialog(): self.liststore.append(row) def emptyString(self, str): -# if not(str and not str.strip()): -# return True -# else: -# return False return not (str and str.strip()) def on_ok_btn_clicked(self, button):