def preload_tables_list(self, txn):
        """ 
        This is used upon initial open of the db to get an actual list
        of tables from the db.
        """

        self.do_sql(txn, "SELECT tbl_name FROM sqlite_master WHERE type = 'table' and tbl_name NOT LIKE 'sqlite_%'")

        rows = txn.fetchall()

        for row in rows:

            tablename = row[0]

            try:
                self.do_sql(txn, "SELECT count(*) FROM %s;" % tablename)

                count = txn.fetchall()

                self.update_table_stats(tablename, count[0][0] if count[0][0] != None and 0 > count[0][0] else -1)
            except:
                logging.info("SqlConnections: Failed to get number of rows for table '%s': %s", tablename, str(e))
                pass
dataset/ETHPy150Open MediaMath/qasino/lib/sqlite_backend.py/SqlConnections.preload_tables_list/swapped operands of `>`