[SQL-CVS] r3571 - SQLObject/branches/0.9/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2008-09-07 12:30:20
|
Author: dan Date: 2008-09-07 06:30:14 -0600 (Sun, 07 Sep 2008) New Revision: 3571 Modified: SQLObject/branches/0.9/sqlobject/dbconnection.py Log: Fixed adding extra URI parameters from the function kwargs when the URI already contains some parameters (backported from trunk rev 3569) Modified: SQLObject/branches/0.9/sqlobject/dbconnection.py =================================================================== --- SQLObject/branches/0.9/sqlobject/dbconnection.py 2008-09-07 12:26:35 UTC (rev 3570) +++ SQLObject/branches/0.9/sqlobject/dbconnection.py 2008-09-07 12:30:14 UTC (rev 3571) @@ -1067,8 +1067,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: |