mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
typos
This commit is contained in:
+3
-3
@@ -10,7 +10,7 @@ from sqlalchemy import create_engine, exc, inspect, text
|
|||||||
DATABASE_URL = os.environ.get('DATABASE_URL')
|
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
|
"""Given an object, return a boolean indicating whether it is an instance
|
||||||
or subclass of :py:class:`Exception`.
|
or subclass of :py:class:`Exception`.
|
||||||
"""
|
"""
|
||||||
@@ -212,7 +212,7 @@ class RecordCollection(object):
|
|||||||
try:
|
try:
|
||||||
record = self[0]
|
record = self[0]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
if isexception(default):
|
if is_exception(default):
|
||||||
raise default
|
raise default
|
||||||
return default
|
return default
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ class Database(object):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<Database open={}>'.format(self.open)
|
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."""
|
"""Returns a list of table names for the connected database."""
|
||||||
|
|
||||||
# Setup SQLAlchemy for Database inspection.
|
# Setup SQLAlchemy for Database inspection.
|
||||||
|
|||||||
Reference in New Issue
Block a user