Recognize pathnames by absence of '://'.
except:
db_uri = find_sqlite_dburi()
- if db_uri.startswith(os.sep) \
- or os.altsep and db_uri.startswith(os.altsep) \
- or db_uri.startswith(os.pardir + os.sep) \
- or os.altsep and db_uri.startswith(os.pardir + os.altsep) \
- or db_uri.startswith(os.curdir + os.sep) \
- or os.altsep and db_uri.startswith(os.curdir + os.altsep):
+ if '://' not in db_uri:
db_uri = 'sqlite://' + os.path.abspath(db_uri).replace(os.sep, '/')
sqlhub.processConnection = connection = connectionForURI(db_uri)