mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
boulder-oracle-sprint: Fixed "manage.py dbshell" for Oracle so sqlplus is invoked correctly.
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1c3fccabd0
commit
b86d69f529
@ -2,9 +2,10 @@ from django.conf import settings
|
||||
import os
|
||||
|
||||
def runshell():
|
||||
args = ''
|
||||
args += settings.DATABASE_USER
|
||||
dsn = settings.DATABASE_USER
|
||||
if settings.DATABASE_PASSWORD:
|
||||
args += "/%s" % settings.DATABASE_PASSWORD
|
||||
args += "@%s" % settings.DATABASE_NAME
|
||||
os.execvp('sqlplus', args)
|
||||
dsn += "/%s" % settings.DATABASE_PASSWORD
|
||||
if settings.DATABASE_NAME:
|
||||
dsn += "@%s" % settings.DATABASE_NAME
|
||||
args = ["sqlplus", "-L", dsn]
|
||||
os.execvp("sqlplus", args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user