mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 21:54:54 +03:00
shlex.join is only available in 3.8+, so only use when present
Fallback is former behaviour of joining with a space.
This commit is contained in:
parent
21a4182b41
commit
5cfd601697
|
@ -974,7 +974,11 @@ def run_command(
|
|||
cmd_list = command
|
||||
# As above, this will usually but not always be correct on Windows, but
|
||||
# is only used for debugging purposes.
|
||||
cmd_str = shlex.join(command)
|
||||
if hasattr(shlex, "join"):
|
||||
cmd_str = shlex.join(command)
|
||||
else:
|
||||
# shlex.join is more correct, but is only available in 3.8+
|
||||
cmd_str = " ".join(command)
|
||||
try:
|
||||
cmd_to_run = command if is_windows else cmd_list
|
||||
ret = subprocess.run(
|
||||
|
|
Loading…
Reference in New Issue
Block a user