summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/sqlite3/client.py')
-rw-r--r--django/db/backends/sqlite3/client.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/django/db/backends/sqlite3/client.py b/django/db/backends/sqlite3/client.py
index a71005fd5b..59a2fe7f50 100644
--- a/django/db/backends/sqlite3/client.py
+++ b/django/db/backends/sqlite3/client.py
@@ -1,15 +1,16 @@
-import subprocess
-
from django.db.backends.base.client import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'sqlite3'
- def runshell(self, parameters):
- # TODO: Remove str() when dropping support for PY37.
- # args parameter accepts path-like objects on Windows since Python 3.8.
- args = [self.executable_name,
- str(self.connection.settings_dict['NAME'])]
- args.extend(parameters)
- subprocess.run(args, check=True)
+ @classmethod
+ def settings_to_cmd_args_env(cls, settings_dict, parameters):
+ args = [
+ cls.executable_name,
+ # TODO: Remove str() when dropping support for PY37. args
+ # parameter accepts path-like objects on Windows since Python 3.8.
+ str(settings_dict['NAME']),
+ *parameters,
+ ]
+ return args, None