Commit 32341612 authored by Mathieu Rodic's avatar Mathieu Rodic

[BUGFIX] Newlines and carriage return do not provoke error anymore in bulk insertions

parent 4216cd4a
...@@ -200,7 +200,9 @@ class bulk_insert: ...@@ -200,7 +200,9 @@ class bulk_insert:
def read(self, size=None): def read(self, size=None):
try: try:
return self.template % next(self.iter) return self.template % tuple(
str(x).replace('\r', '').replace('\n', '\\n').replace('\t', '\\t') for x in next(self.iter)
)
except StopIteration: except StopIteration:
return '' return ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment