Улучшен поиск, правки кода.

This commit is contained in:
Jack Stdin
2016-02-02 13:27:42 +03:00
parent 90cae604fa
commit 8088bff07a
13 changed files with 107 additions and 46 deletions

View File

@@ -3,6 +3,7 @@ import os
from aore.config import folders
from aore.dbutils.dbschemas import db_shemas
from aore.miscutils.exceptions import FiasException
from xmlparser import XMLParser
@@ -10,7 +11,7 @@ class AoDataParser:
def __init__(self, datasource, pagesize):
self.datasource = datasource
if self.datasource.table_name not in db_shemas:
raise BaseException("Cannot parse {}: Not configured.".format(self.datasource.table_name))
raise FiasException("Cannot parse {}: Not configured.".format(self.datasource.table_name))
else:
self.allowed_fields = db_shemas[self.datasource.table_name].fields