From 422aadfe2aea988927888b970fcce4e8ce492fac Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Fri, 21 Jul 2006 18:15:02 +0000 Subject: [multi-db] Updated runshell() calls to accept settings. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3412 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/ado_mssql/client.py | 2 +- django/db/backends/mysql/client.py | 3 +-- django/db/backends/oracle/client.py | 3 +-- django/db/backends/postgresql/client.py | 3 +-- django/db/backends/sqlite3/client.py | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) (limited to 'django/db/backends') diff --git a/django/db/backends/ado_mssql/client.py b/django/db/backends/ado_mssql/client.py index 5c197cafa4..a5bd617ff1 100644 --- a/django/db/backends/ado_mssql/client.py +++ b/django/db/backends/ado_mssql/client.py @@ -1,2 +1,2 @@ -def runshell(): +def runshell(settings): raise NotImplementedError diff --git a/django/db/backends/mysql/client.py b/django/db/backends/mysql/client.py index f9d6297b8e..917437e81c 100644 --- a/django/db/backends/mysql/client.py +++ b/django/db/backends/mysql/client.py @@ -1,7 +1,6 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = [''] args += ["--user=%s" % settings.DATABASE_USER] if settings.DATABASE_PASSWORD: diff --git a/django/db/backends/oracle/client.py b/django/db/backends/oracle/client.py index 7e32ebef2f..48954fe790 100644 --- a/django/db/backends/oracle/client.py +++ b/django/db/backends/oracle/client.py @@ -1,7 +1,6 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = '' args += settings.DATABASE_USER if settings.DATABASE_PASSWORD: diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py index 8123ec7848..38428a9c62 100644 --- a/django/db/backends/postgresql/client.py +++ b/django/db/backends/postgresql/client.py @@ -1,7 +1,6 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = ['psql'] if settings.DATABASE_USER: args += ["-U", settings.DATABASE_USER] diff --git a/django/db/backends/sqlite3/client.py b/django/db/backends/sqlite3/client.py index 097218341f..43978da0be 100644 --- a/django/db/backends/sqlite3/client.py +++ b/django/db/backends/sqlite3/client.py @@ -1,6 +1,5 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = ['', settings.DATABASE_NAME] os.execvp('sqlite3', args) -- cgit v1.3