[3.2.x] Fixed #32740 -- Caught possible exception when initializing colorama.
Backport of c2e6047c725e26987c87e2be59f2ab4bf9828fa5 from main
This commit is contained in:
parent
d743c37326
commit
a173202dd4
@ -10,10 +10,10 @@ from django.utils import termcolors
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import colorama
|
import colorama
|
||||||
except ImportError:
|
colorama.init()
|
||||||
|
except (ImportError, OSError):
|
||||||
HAS_COLORAMA = False
|
HAS_COLORAMA = False
|
||||||
else:
|
else:
|
||||||
colorama.init()
|
|
||||||
HAS_COLORAMA = True
|
HAS_COLORAMA = True
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,3 +18,7 @@ Bugfixes
|
|||||||
|
|
||||||
* Prevented unnecessary initialization of unused caches following a regression
|
* Prevented unnecessary initialization of unused caches following a regression
|
||||||
in Django 3.2 (:ticket:`32747`).
|
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`).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user