diff options
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) + |