sequenial-blacklist: Properly read the local file
This commit is contained in:
parent
de0d0cafc5
commit
c4b994a947
2 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@ class SequenceList:
|
||||||
|
|
||||||
def __init__(self, wordlist):
|
def __init__(self, wordlist):
|
||||||
self.list = {}
|
self.list = {}
|
||||||
for line in wordlist.split('\r\n'):
|
for line in wordlist:
|
||||||
if line is '':
|
if line is '':
|
||||||
continue
|
continue
|
||||||
split = line.split(':')
|
split = line.split(':')
|
||||||
|
|
|
@ -21,7 +21,7 @@ class TTSequenceList(SequenceList):
|
||||||
doc = self.ch.getDocumentSpec()
|
doc = self.ch.getDocumentSpec()
|
||||||
self.ch.getDocument(doc)
|
self.ch.getDocument(doc)
|
||||||
self.ch.downloadToRam(fs)
|
self.ch.downloadToRam(fs)
|
||||||
return fs.getData()
|
return fs.getData().split('\r\n')
|
||||||
|
|
||||||
def loadSquencesLocally(self):
|
def loadSquencesLocally(self):
|
||||||
vfs = VirtualFileSystem.getGlobalPtr()
|
vfs = VirtualFileSystem.getGlobalPtr()
|
||||||
|
@ -32,5 +32,5 @@ class TTSequenceList(SequenceList):
|
||||||
if not found:
|
if not found:
|
||||||
self.notify.warning("Couldn't find blacklist sequence data file!")
|
self.notify.warning("Couldn't find blacklist sequence data file!")
|
||||||
return
|
return
|
||||||
data = vfs.readFile(filename, 1)
|
data = vfs.readFile(filename, True)
|
||||||
return data
|
return data.split('\n')
|
||||||
|
|
Loading…
Reference in a new issue