summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/core/management/color.py4
-rw-r--r--docs/releases/3.2.4.txt4
2 files changed, 6 insertions, 2 deletions
diff --git a/django/core/management/color.py b/django/core/management/color.py
index 3227809303..be8c31bb95 100644
--- a/django/core/management/color.py
+++ b/django/core/management/color.py
@@ -10,10 +10,10 @@ from django.utils import termcolors
try:
import colorama
-except ImportError:
+ colorama.init()
+except (ImportError, OSError):
HAS_COLORAMA = False
else:
- colorama.init()
HAS_COLORAMA = True
diff --git a/docs/releases/3.2.4.txt b/docs/releases/3.2.4.txt
index dac726e961..048eb8c385 100644
--- a/docs/releases/3.2.4.txt
+++ b/docs/releases/3.2.4.txt
@@ -18,3 +18,7 @@ Bugfixes
* Prevented unnecessary initialization of unused caches following a regression
in Django 3.2 (:ticket:`32747`).
+
+* Fixed a crash in Django 3.2 that could occur when running ``mod_wsgi`` with
+ the recommended settings while the Windows ``colorama`` library was installed
+ (:ticket:`32740`).