diff -ru django-1.0.2-final/db/backends/mysql/client.py django/db/backends/mysql/client.py
|
old
|
new
|
|
| 1 | 1 | from django.db.backends import BaseDatabaseClient |
| 2 | 2 | from django.conf import settings |
| 3 | 3 | import os |
| | 4 | import sys |
| 4 | 5 | |
| 5 | 6 | class DatabaseClient(BaseDatabaseClient): |
| 6 | 7 | executable_name = 'mysql' |
| 7 | 8 | |
| 8 | 9 | def runshell(self): |
| 9 | | args = [''] |
| | 10 | args = [self.executable_name] |
| 10 | 11 | db = settings.DATABASE_OPTIONS.get('db', settings.DATABASE_NAME) |
| 11 | 12 | user = settings.DATABASE_OPTIONS.get('user', settings.DATABASE_USER) |
| 12 | 13 | passwd = settings.DATABASE_OPTIONS.get('passwd', settings.DATABASE_PASSWORD) |
| … |
… |
|
| 28 | 29 | if db: |
| 29 | 30 | args += [db] |
| 30 | 31 | |
| 31 | | os.execvp(self.executable_name, args) |
| | 32 | if os.name == 'nt': |
| | 33 | sys.exit(os.system(" ".join(args))) |
| | 34 | else: |
| | 35 | os.execvp(self.executable_name, args) |
diff -ru django-1.0.2-final/db/backends/oracle/client.py django/db/backends/oracle/client.py
|
old
|
new
|
|
| 1 | 1 | from django.db.backends import BaseDatabaseClient |
| 2 | 2 | from django.conf import settings |
| 3 | 3 | import os |
| | 4 | import sys |
| 4 | 5 | |
| 5 | 6 | class DatabaseClient(BaseDatabaseClient): |
| 6 | 7 | executable_name = 'sqlplus' |
| … |
… |
|
| 12 | 13 | if settings.DATABASE_NAME: |
| 13 | 14 | dsn += "@%s" % settings.DATABASE_NAME |
| 14 | 15 | args = [self.executable_name, "-L", dsn] |
| 15 | | os.execvp(self.executable_name, args) |
| | 16 | if os.name == 'nt': |
| | 17 | sys.exit(os.system(" ".join(args))) |
| | 18 | else: |
| | 19 | os.execvp(self.executable_name, args) |
diff -ru django-1.0.2-final/db/backends/postgresql/client.py django/db/backends/postgresql/client.py
|
old
|
new
|
|
| 1 | 1 | from django.db.backends import BaseDatabaseClient |
| 2 | 2 | from django.conf import settings |
| 3 | 3 | import os |
| | 4 | import sys |
| 4 | 5 | |
| 5 | 6 | class DatabaseClient(BaseDatabaseClient): |
| 6 | 7 | executable_name = 'psql' |
| … |
… |
|
| 16 | 17 | if settings.DATABASE_PORT: |
| 17 | 18 | args.extend(["-p", str(settings.DATABASE_PORT)]) |
| 18 | 19 | args += [settings.DATABASE_NAME] |
| 19 | | os.execvp(self.executable_name, args) |
| | 20 | if os.name == 'nt': |
| | 21 | sys.exit(os.system(" ".join(args))) |
| | 22 | else: |
| | 23 | os.execvp(self.executable_name, args) |
diff -ru django-1.0.2-final/db/backends/sqlite3/client.py django/db/backends/sqlite3/client.py
|
old
|
new
|
|
| 1 | 1 | from django.db.backends import BaseDatabaseClient |
| 2 | 2 | from django.conf import settings |
| 3 | 3 | import os |
| | 4 | import sys |
| 4 | 5 | |
| 5 | 6 | class DatabaseClient(BaseDatabaseClient): |
| 6 | 7 | executable_name = 'sqlite3' |
| 7 | 8 | |
| 8 | 9 | def runshell(self): |
| 9 | | args = ['', settings.DATABASE_NAME] |
| 10 | | os.execvp(self.executable_name, args) |
| | 10 | args = [self.executable_name, settings.DATABASE_NAME] |
| | 11 | if os.name == 'nt': |
| | 12 | sys.exit(os.system(" ".join(args))) |
| | 13 | else: |
| | 14 | os.execvp(self.executable_name, args) |