1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed #32740 -- Caught possible exception when initializing colorama.

This commit is contained in:
Carlton Gibson 2021-05-12 15:22:34 +02:00
parent 127fd927d0
commit c2e6047c72
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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`).