changeset 473:d710a48e6fb7

connect problem unfixed
author catherine@dellzilla
date Fri, 05 Mar 2010 12:59:28 -0500
parents 9f58d8f807d3
children f29923ac1119
files sqlpython/connections.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/connections.py	Wed Mar 03 13:49:08 2010 -0500
+++ b/sqlpython/connections.py	Fri Mar 05 12:59:28 2010 -0500
@@ -133,8 +133,12 @@
     def uri(self):
         return '%s://%s:%s@%s:%s/%s' % (self.rdbms, self.username, self.password,
                                          self.hostname, self.port, self.database)  
+    colon_between_username_passwd = re.compile(r':(?=[^/]+@)')
     def gerald_uri(self):
-        return self.uri().split('?mode=')[0]    
+        result = self.uri().split('?mode=')[0]    
+        result = self.colon_between_username_passwd.sub('/', result)
+        result = result.replace('://', ':/')
+        return result
     def determine_rdbms(self):
         if self.opts.mysql:
             self.__class__ = MySQLConnectionData