Code

Ticket #9972: client.py.diff

File client.py.diff, 695 bytes (added by lijinguo@…, 5 years ago)
Line 
1Index: django/db/backends/oracle/client.py
2===================================================================
3--- django/db/backends/oracle/client.py (revision 9702)
4+++ django/db/backends/oracle/client.py (working copy)
5@@ -9,7 +9,9 @@
6         dsn = settings.DATABASE_USER
7         if settings.DATABASE_PASSWORD:
8             dsn += "/%s" % settings.DATABASE_PASSWORD
9+        if settings.DATABASE_HOST:
10+            dsn += "@//%s" % settings.DATABASE_HOST
11         if settings.DATABASE_NAME:
12-            dsn += "@%s" % settings.DATABASE_NAME
13+            dsn += "/%s" % settings.DATABASE_NAME
14         args = [self.executable_name, "-L", dsn]
15         os.execvp(self.executable_name, args)