Author: phd
Date: 2009-04-29 09:22:20 -0600 (Wed, 29 Apr 2009)
New Revision: 3868
Modified:
SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py
Log:
Merged revision 3867 from 0.9 branch: make sqlite URI nicer.
Modified: SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py 2009-04-29 15:20:56 UTC (rev 3867)
+++ SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py 2009-04-29 15:22:20 UTC (rev 3868)
@@ -105,7 +105,12 @@
connectionFromURI = classmethod(connectionFromURI)
def uri(self):
- return 'sqlite:///%s' % self.filename
+ path = self.filename
+ if path == ":memory:":
+ path = "/:memory:"
+ else:
+ path = "//" + path
+ return 'sqlite:%s' % path
def getConnection(self):
# SQLite can't share connections between threads, and so can't
|