Преглед на файлове

bug fix: sql handler ...

Steve Nyemba преди 2 години
родител
ревизия
8a6beae956
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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.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