We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a08569d commit ed0d893Copy full SHA for ed0d893
litecli/sqlexecute.py
@@ -14,6 +14,7 @@
14
15
import sqlparse
16
import os.path
17
+from urllib.parse import urlparse
18
19
from .packages import special
20
@@ -68,10 +69,11 @@ def connect(self, database=None):
68
69
db = database or self.dbname
70
_logger.debug("Connection DB Params: \n\tdatabase: %r", db)
71
- if db.startswith("file:"):
72
+ location = urlparse(db)
73
+ if location.scheme and location.scheme == "file":
74
uri = True
75
db_name = db
- db_filename, *_ = db_name[5:].split("?", 1)
76
+ db_filename = location.path
77
else:
78
uri = False
79
db_filename = db_name = os.path.expanduser(db)
0 commit comments