Merge pull request #220 from ottopasuuna/fix-csv-import

Fix string decode error when importing csv files
This commit is contained in:
Damien Elmes 2018-01-03 13:17:48 +10:00 committed by GitHub
commit c08512e9d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ class TextImporter(NoteImporter):
self.data = [sub(x)+"\n" for x in self.data.split("\n") if sub(x) != "__comment"] self.data = [sub(x)+"\n" for x in self.data.split("\n") if sub(x) != "__comment"]
if self.data: if self.data:
if self.data[0].startswith("tags:"): if self.data[0].startswith("tags:"):
tags = str(self.data[0][5:], "utf8").strip() tags = str(self.data[0][5:]).strip()
self.tagsToAdd = tags.split(" ") self.tagsToAdd = tags.split(" ")
del self.data[0] del self.data[0]
self.updateDelimiter() self.updateDelimiter()