Author: phd
Date: 2006-09-01 06:59:15 -0600 (Fri, 01 Sep 2006)
New Revision: 1892
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
Log:
Fixed compatibility: Python 2.3 doesn't have .rsplit().
Modified: SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-09-01 12:58:42 UTC (rev 1891)
+++ SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-09-01 12:59:15 UTC (rev 1892)
@@ -95,7 +95,8 @@
else:
host, rest = rest.split('/', 1)
if host and host.find('@') != -1:
- user, host = host.rsplit('@', 1)
+ user = host[:host.rfind('@')] # Python 2.3 doesn't have .rsplit()
+ host = host[host.rfind('@')+1:] # !!!
if user.find(':') != -1:
user, password = user.split(':', 1)
else:
|