summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne BERSAC <bersace03@gmail.com>2016-06-27 18:20:40 +0200
committerTim Graham <timograham@gmail.com>2016-06-27 12:20:40 -0400
commit03f6d272abe12a0d5c915253efb5de99583d2413 (patch)
tree6a743b7534319f996193dab42c2e775832493403
parentd47f6d75ef67dbd18abf2bb927753f739a9c117d (diff)
Fixed #26751 -- Made dbshell exit with the shell's error code.
-rw-r--r--django/db/backends/mysql/client.py2
-rw-r--r--django/db/backends/oracle/client.py2
-rw-r--r--django/db/backends/postgresql/client.py2
-rw-r--r--django/db/backends/sqlite3/client.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/django/db/backends/mysql/client.py b/django/db/backends/mysql/client.py
index 29059b0fa2..c5cc69c3a0 100644
--- a/django/db/backends/mysql/client.py
+++ b/django/db/backends/mysql/client.py
@@ -39,4 +39,4 @@ class DatabaseClient(BaseDatabaseClient):
def runshell(self):
args = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict)
- subprocess.call(args)
+ subprocess.check_call(args)
diff --git a/django/db/backends/oracle/client.py b/django/db/backends/oracle/client.py
index da4f5af275..102e77fd15 100644
--- a/django/db/backends/oracle/client.py
+++ b/django/db/backends/oracle/client.py
@@ -9,4 +9,4 @@ class DatabaseClient(BaseDatabaseClient):
def runshell(self):
conn_string = self.connection._connect_string()
args = [self.executable_name, "-L", conn_string]
- subprocess.call(args)
+ subprocess.check_call(args)
diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py
index 1b4b884c60..dd3d40c064 100644
--- a/django/db/backends/postgresql/client.py
+++ b/django/db/backends/postgresql/client.py
@@ -55,7 +55,7 @@ class DatabaseClient(BaseDatabaseClient):
# If the current locale can't encode the data, we let
# the user input the password manually.
pass
- subprocess.call(args)
+ subprocess.check_call(args)
finally:
if temp_pgpass:
temp_pgpass.close()
diff --git a/django/db/backends/sqlite3/client.py b/django/db/backends/sqlite3/client.py
index 2e6477a1ca..0c490ea587 100644
--- a/django/db/backends/sqlite3/client.py
+++ b/django/db/backends/sqlite3/client.py
@@ -9,4 +9,4 @@ class DatabaseClient(BaseDatabaseClient):
def runshell(self):
args = [self.executable_name,
self.connection.settings_dict['NAME']]
- subprocess.call(args)
+ subprocess.check_call(args)