]> git.datanom.net - lensdatabase.git/commitdiff
Clean up code
authorMichael Rasmussen <mir@datanom.net>
Mon, 15 Apr 2024 16:53:20 +0000 (18:53 +0200)
committerMichael Rasmussen <mir@datanom.net>
Mon, 15 Apr 2024 16:53:20 +0000 (18:53 +0200)
db.py
searchwindow.py

diff --git a/db.py b/db.py
index b285ff22579033dce94bc14d5a449b7c69027e8c..0fa2839d7791e70cb8ec73294746a0c8069c1bbf 100644 (file)
--- a/db.py
+++ b/db.py
@@ -113,7 +113,6 @@ class DB:
             lensmaker = cur.fetchone()
         else:
             lensmaker = (maker, )
             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        
         cur.execute(sql, lensmaker)
         rows = cur. fetchall()
         return rows        
@@ -130,7 +129,6 @@ class DB:
             lensmaker = cur.fetchone()
         else:
             lensmaker = (maker, )
             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        
         cur.execute(sql, ('%'+pattern+'%', ) + lensmaker)
         rows = cur. fetchall()
         return rows        
index 6ef278524da85cf637aea177f68d1de8c4c371b3..d2e8e72d817573db8f2930e0c4d64503fe431b60 100644 (file)
@@ -40,10 +40,6 @@ class SearchResultDialog():
                 self.liststore.append(row)
 
     def emptyString(self, str):
                 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):
         return not (str and str.strip())
 
     def on_ok_btn_clicked(self, button):
This page took 0.044068 seconds and 5 git commands to generate.