This commit is contained in:
Jing Ling
2020-09-16 00:48:41 +08:00
parent 78a1f14c91
commit 685d9ff5d2
+3 -3
View File
@@ -10,7 +10,7 @@ from sqlalchemy import create_engine, exc, inspect, text
DATABASE_URL = os.environ.get('DATABASE_URL')
def isexception(obj):
def is_exception(obj):
"""Given an object, return a boolean indicating whether it is an instance
or subclass of :py:class:`Exception`.
"""
@@ -212,7 +212,7 @@ class RecordCollection(object):
try:
record = self[0]
except IndexError:
if isexception(default):
if is_exception(default):
raise default
return default
@@ -276,7 +276,7 @@ class Database(object):
def __repr__(self):
return '<Database open={}>'.format(self.open)
def get_table_names(self, internal=False):
def get_table_names(self):
"""Returns a list of table names for the connected database."""
# Setup SQLAlchemy for Database inspection.