mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
universal newlines when importing
This commit is contained in:
parent
a9bb1639c0
commit
a73e4757ad
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ class TextImporter(Importer):
|
|||
|
||||
def openFile(self):
|
||||
self.dialect = None
|
||||
self.fileobj = open(self.file, "rb")
|
||||
self.fileobj = open(self.file, "rbU")
|
||||
self.data = self.fileobj.read()
|
||||
self.data = re.sub("^ *#.*", "", self.data)
|
||||
self.data = [x for x in self.data.split("\n") if x]
|
||||
|
|
Loading…
Reference in a new issue