summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-23 11:14:27 +0200
committerGitHub <noreply@github.com>2020-06-23 11:14:27 +0200
commit02ea98bc2ff972f7705bfffb24843494086d011f (patch)
treeb1a7a7715afa715638a6a3c659f69def8b326b3b
parentcc7c16af98e4c9a7146c248c8567aac7a50e0fbb (diff)
Refs #31692 -- Fixed compilemessages crash on Windows with Python < 3.8.
Regression in ed0a040773f5bad187170ab4e3b094fe3108d702. See https://bugs.python.org/issue31961
-rw-r--r--django/core/management/commands/compilemessages.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/core/management/commands/compilemessages.py b/django/core/management/commands/compilemessages.py
index 308fa8831b..cad24f8140 100644
--- a/django/core/management/commands/compilemessages.py
+++ b/django/core/management/commands/compilemessages.py
@@ -154,7 +154,9 @@ class Command(BaseCommand):
self.has_errors = True
return
- args = [self.program, *self.program_options, '-o', mo_path, po_path]
+ # PY37: Remove str() when dropping support for PY37.
+ # https://bugs.python.org/issue31961
+ args = [self.program, *self.program_options, '-o', str(mo_path), str(po_path)]
futures.append(executor.submit(popen_wrapper, args))
for future in concurrent.futures.as_completed(futures):