summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/client.py
diff options
context:
space:
mode:
authorMihail Milushev <lanzz@lanzz.org>2014-03-09 13:00:42 +0200
committerTim Graham <timograham@gmail.com>2014-08-04 09:21:03 -0400
commitbf5382c6e549d78da9f7029cd86686459b52eaed (patch)
tree7be7807ea05b2444ef99dc2251e62ebcdddff778 /django/db/backends/mysql/client.py
parente4dd8b5dde922d967697b2bdd573aa2364da4f1b (diff)
downloaddjango-bf5382c6e549d78da9f7029cd86686459b52eaed.tar.gz
Fixed #22234 -- Replaced OS-specific code with subprocess.call() in dbshell.
This fixes escaping of special characters on Windows.
Diffstat (limited to 'django/db/backends/mysql/client.py')
-rw-r--r--django/db/backends/mysql/client.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/django/db/backends/mysql/client.py b/django/db/backends/mysql/client.py
index 8364c7b6e6..2106c4d3da 100644
--- a/django/db/backends/mysql/client.py
+++ b/django/db/backends/mysql/client.py
@@ -1,5 +1,4 @@
-import os
-import sys
+import subprocess
from django.db.backends import BaseDatabaseClient
@@ -34,7 +33,4 @@ class DatabaseClient(BaseDatabaseClient):
if db:
args += [db]
- if os.name == 'nt':
- sys.exit(os.system(" ".join(args)))
- else:
- os.execvp(self.executable_name, args)
+ subprocess.call(args)