diff options
author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-04-11 11:41:35 +0000 |
---|---|---|
committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-04-11 11:41:35 +0000 |
commit | d18f75af447bc18b062564ab163943c16d79effc (patch) | |
tree | f7086d0df781be0cb86e51dcb6fd09f85f66b597 /django/db/backends/oracle/client.py | |
parent | 0d2cf7bdd6ee7b404f6e0f8eebfa9e8979ba7671 (diff) | |
download | django-d18f75af447bc18b062564ab163943c16d79effc.tar.gz |
Fixed #10357 -- Fixed the "dbshell" command for Windows users.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/oracle/client.py')
-rw-r--r-- | django/db/backends/oracle/client.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/django/db/backends/oracle/client.py b/django/db/backends/oracle/client.py index 84193eaedc..ccc64ebffc 100644 --- a/django/db/backends/oracle/client.py +++ b/django/db/backends/oracle/client.py @@ -1,5 +1,7 @@ -from django.db.backends import BaseDatabaseClient import os +import sys + +from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'sqlplus' @@ -7,4 +9,8 @@ class DatabaseClient(BaseDatabaseClient): def runshell(self): conn_string = self.connection._connect_string() args = [self.executable_name, "-L", conn_string] - os.execvp(self.executable_name, args) + if os.name == 'nt': + sys.exit(os.system(" ".join(args))) + else: + os.execvp(self.executable_name, args) + |