From 8a6beae956b9aed0645eda26784ba209be0407a7 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Sun, 26 Jun 2022 15:48:29 -0500 Subject: [PATCH] bug fix: sql handler ... --- transport/disk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/disk.py b/transport/disk.py index 6963694..dad2f33 100644 --- a/transport/disk.py +++ b/transport/disk.py @@ -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