mirror of https://github.com/django/django.git
Fixed #26751 -- Made dbshell exit with the shell's error code.
This commit is contained in:
parent
d47f6d75ef
commit
03f6d272ab
|
@ -39,4 +39,4 @@ class DatabaseClient(BaseDatabaseClient):
|
||||||
|
|
||||||
def runshell(self):
|
def runshell(self):
|
||||||
args = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict)
|
args = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict)
|
||||||
subprocess.call(args)
|
subprocess.check_call(args)
|
||||||
|
|
|
@ -9,4 +9,4 @@ class DatabaseClient(BaseDatabaseClient):
|
||||||
def runshell(self):
|
def runshell(self):
|
||||||
conn_string = self.connection._connect_string()
|
conn_string = self.connection._connect_string()
|
||||||
args = [self.executable_name, "-L", conn_string]
|
args = [self.executable_name, "-L", conn_string]
|
||||||
subprocess.call(args)
|
subprocess.check_call(args)
|
||||||
|
|
|
@ -55,7 +55,7 @@ class DatabaseClient(BaseDatabaseClient):
|
||||||
# If the current locale can't encode the data, we let
|
# If the current locale can't encode the data, we let
|
||||||
# the user input the password manually.
|
# the user input the password manually.
|
||||||
pass
|
pass
|
||||||
subprocess.call(args)
|
subprocess.check_call(args)
|
||||||
finally:
|
finally:
|
||||||
if temp_pgpass:
|
if temp_pgpass:
|
||||||
temp_pgpass.close()
|
temp_pgpass.close()
|
||||||
|
|
|
@ -9,4 +9,4 @@ class DatabaseClient(BaseDatabaseClient):
|
||||||
def runshell(self):
|
def runshell(self):
|
||||||
args = [self.executable_name,
|
args = [self.executable_name,
|
||||||
self.connection.settings_dict['NAME']]
|
self.connection.settings_dict['NAME']]
|
||||||
subprocess.call(args)
|
subprocess.check_call(args)
|
||||||
|
|
Loading…
Reference in New Issue