bug fix: sql handler ...

This commit is contained in:
Steve Nyemba 2022-06-26 15:48:29 -05:00
parent ae1a4cec73
commit 8a6beae956
1 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ class SQLiteWriter(SQLite,DiskWriter) :
# self.conn.row_factory = sqlite3.Row
# self.fields = args['fields'] if 'fields' in args else []
if self.fields and not self.isready():
if self.fields and not self.isready() and self.table:
self.init(self.fields)
SQLiteWriter.connection = self.conn
def init(self,fields):
@ -210,7 +210,7 @@ class SQLiteWriter(SQLite,DiskWriter) :
r = r.fetchall()
cursor.close()
return r[0][0]
return r[0][0] != 0
except Exception as e:
pass
return 0