Fix whitelist

This commit is contained in:
John 2015-06-18 19:07:51 +03:00
parent 1213349611
commit 9d0029cdfb

View file

@ -46,10 +46,11 @@ class WhiteList:
lastWord = words[-1]
if (not lastWord) or self.isPrefix(lastWord):
newWords[-1] = lastWord
else:
newWords[-1] = self.getReplacement(lastWord, av, garbler)
if not garbler:
if (not lastWord) or self.isPrefix(lastWord):
newWords[-1] = lastWord
else:
newWords[-1] = self.getReplacement(lastWord, av, garbler)
return ' '.join(newWords)