from sqlobject import SQLObject, StringCol, UnicodeCol, IntCol, BoolCol, \
ForeignKey, DateCol, DatabaseIndex, RelatedJoin, \
connectionForURI, sqlhub, SQLObjectNotFound, dberrors
+from .compat import string_type
from .config import get_config
__all__ = ['Author', 'Book', 'Extension', 'Genre', 'Language',
if db_uri is None:
try:
db_uri = get_config().get('database', 'URI')
- except:
+ except Exception:
db_uri = find_sqlite_dburi()
if '://' not in db_uri:
if connection.dbName == 'sqlite':
def lower(s):
- if isinstance(s, basestring):
+ if isinstance(s, string_type):
return s.lower()
return s
print("DB dirs:", db_dirs)
print("DB URI:", find_sqlite_dburi())
+
if __name__ == '__main__':
test()