[SQL-CVS] r3569 - SQLObject/trunk/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2008-09-07 12:24:04
|
Author: dan Date: 2008-09-07 06:24:00 -0600 (Sun, 07 Sep 2008) New Revision: 3569 Modified: SQLObject/trunk/sqlobject/dbconnection.py Log: Fixed adding extra URI parameters from the function kwargs when the URI already contains some parameters Modified: SQLObject/trunk/sqlobject/dbconnection.py =================================================================== --- SQLObject/trunk/sqlobject/dbconnection.py 2008-09-05 18:11:47 UTC (rev 3568) +++ SQLObject/trunk/sqlobject/dbconnection.py 2008-09-07 12:24:00 UTC (rev 3569) @@ -912,8 +912,9 @@ def connectionForURI(self, uri, **args): if args: if '?' not in uri: - uri += '?' - uri += urllib.urlencode(args) + uri += '?' + urllib.urlencode(args) + else: + uri += '&' + urllib.urlencode(args) if self.cachedURIs.has_key(uri): return self.cachedURIs[uri] if uri.find(':') != -1: |