Browse Source

bug fix: sql handler ...

Steve Nyemba 2 years ago
parent
commit
8a6beae956
1 changed files with 2 additions and 2 deletions
  1. 2 2
      transport/disk.py

+ 2 - 2
transport/disk.py

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