Merge "Catch the right type of exceptions"

This commit is contained in:
Jenkins 2017-01-18 18:21:39 +00:00 committed by Gerrit Code Review
commit 205a9fee94
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class DataBaseModelProcessor(object):
def get_table_class(self, api_name, table_name):
try:
return self.db_models.get(api_name)[table_name]
except ValueError:
except(TypeError, KeyError):
raise Exception('Unknown table name %s' % table_name)
def build_sqla_models(self, api_name, base=None):