[SQL-CVS] r3869 - SQLObject/trunk/sqlobject/sqlite
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2009-04-29 15:23:03
|
Author: phd Date: 2009-04-29 09:22:54 -0600 (Wed, 29 Apr 2009) New Revision: 3869 Modified: SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py Log: Merged revision 3867 from 0.9 branch: make sqlite URI nicer. Modified: SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py =================================================================== --- SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2009-04-29 15:22:20 UTC (rev 3868) +++ SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2009-04-29 15:22:54 UTC (rev 3869) @@ -106,7 +106,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 |