mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #31076 -- Fixed dbshell crash on Windows with Python < 3.8.
subprocess.run()'s args parameter accepts path-like objects on Windows since Python 3.8.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4161e35048
commit
9d40b6bbf4
@@ -7,6 +7,8 @@ class DatabaseClient(BaseDatabaseClient):
|
||||
executable_name = 'sqlite3'
|
||||
|
||||
def runshell(self):
|
||||
# TODO: Remove str() when dropping support for PY37.
|
||||
# args parameter accepts path-like objects on Windows since Python 3.8.
|
||||
args = [self.executable_name,
|
||||
self.connection.settings_dict['NAME']]
|
||||
str(self.connection.settings_dict['NAME'])]
|
||||
subprocess.run(args, check=True)
|
||||
|
||||
Reference in New Issue
Block a user