Commits

Mike Bayer  committed d44d3e5

fixed host connector again, now for [ticket:197]

  • Participants
  • Parent commits eb19214

Comments (0)

Files changed (1)

File lib/sqlalchemy/databases/oracle.py

         return self.module
 
     def create_connect_args(self, url):
-        if url.database:
-            # if we have a database, then we have a remote host
-            port = url.port or 1521
-            dsn = self.module.makedsn(url.host,port,url.database)
-        else:
-            # we have a local tnsname
-            dsn = url.host
-        opts = dict(
-            user=url.username,
-            password=url.password,
-            dsn = dsn,
-            threaded = self.threaded
-            )        
+        opts = url.translate_connect_args(['dsn', None, 'user', 'password'])
+        opts['threaded'] = self.threaded
         return ([], opts)
         
     def type_descriptor(self, typeobj):