From 4a985e82dc693a199a597285149b898d90b367c7 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 11 Aug 2020 16:42:21 -0500 Subject: [PATCH] bug fix with diskwriter (adding return carriage) --- transport/disk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transport/disk.py b/transport/disk.py index 3fbaecc..02d03c6 100644 --- a/transport/disk.py +++ b/transport/disk.py @@ -161,7 +161,9 @@ class SQLiteWriter(DiskWriter) : sql = " " .join(["INSERT INTO ",self.table,"(", ",".join(self.fields) ,")", "values(':values')"]) for row in info : - cursor.execute(sql.replace(":values",json.dumps(row))) + stream = json.dumps(row) + stream = stream.replace("'","''") + cursor.execute(sql.replace(":values",stream) ) # self.conn.commit() # print (sql)