summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-11-21 16:58:51 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-11-21 16:58:51 +0100
commitb5071fea6a4ae2c119b7e41d5580fdf8e636a75c (patch)
tree85dbe6be7697d5edd675abb65f11322306c1898c
parent3d6c67951a22b1a0ad7b0e2fad877538f1a16169 (diff)
downloadsearxng-b5071fea6a4ae2c119b7e41d5580fdf8e636a75c.tar.gz
searxng-b5071fea6a4ae2c119b7e41d5580fdf8e636a75c.zip
[fix] remove trailing 0x00 from csv output
-rw-r--r--searx/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 2fa6ebf0c..9494bdf3d 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -169,6 +169,8 @@ class UnicodeWriter:
data = self.queue.getvalue()
if IS_PY2:
data = data.decode("utf-8")
+ else:
+ data = data.strip('\x00')
# ... and reencode it into the target encoding
data = self.encoder.encode(data)
# write to the target stream