[SQL-CVS] r1805 - SQLObject/branches/0.7-bugfix/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2006-06-13 21:25:38
|
Author: ianb
Date: 2006-06-13 15:25:24 -0600 (Tue, 13 Jun 2006)
New Revision: 1805
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
Log:
Fix the .uri() method on dbconnections
Modified: SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-06-13 19:45:55 UTC (rev 1804)
+++ SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-06-13 21:25:24 UTC (rev 1805)
@@ -56,14 +56,15 @@
auth = getattr(self, 'user', None) or ''
if auth:
if self.password:
- auth = auth + '@' + self.password
- auth = auth + ':'
+ auth = auth + ':' + self.password
+ auth = auth + '@'
else:
assert not getattr(self, 'password', None), (
'URIs cannot express passwords without usernames')
uri = '%s://%s' % (self.dbName, auth)
if self.host:
- uri += self.host + '/'
+ uri += self.host
+ uri += '/'
db = self.db
if db.startswith('/'):
db = path[1:]
|