Улучшен поиск, правки кода.
This commit is contained in:
6
aore/miscutils/exceptions.py
Normal file
6
aore/miscutils/exceptions.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
class FiasException(Exception):
|
||||
def __str__(self):
|
||||
return repr(self.args[0])
|
||||
@@ -85,8 +85,7 @@ class SphinxHelper:
|
||||
splitting_seq = line.split(' ')
|
||||
keyword = splitting_seq[0]
|
||||
freq = splitting_seq[1].rstrip('\n')
|
||||
if not keyword or not freq:
|
||||
raise BaseException("Cannot process {}".format(self.files['dict.txt']))
|
||||
assert keyword and freq, "Cannot process {}".format(self.files['dict.txt'])
|
||||
|
||||
nodes.append(keyword)
|
||||
nodes.append(trigram(keyword))
|
||||
|
||||
Reference in New Issue
Block a user