diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-09-03 10:11:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-03 10:11:15 +0200 |
| commit | 048d75aeb1e2b1c08b1b9ec359397f00aec1b57d (patch) | |
| tree | c4f2d5779490d040aebc5a600a0fd16585fde8c2 | |
| parent | bcd80de8b5264d8c853bbd38bfeb02279a9b3799 (diff) | |
Refs #34768 -- Ignored lack of just_fix_windows_console() for colorama < 0.4.6.
| -rw-r--r-- | django/core/management/color.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/django/core/management/color.py b/django/core/management/color.py index 3bcefcd990..eef64b2249 100644 --- a/django/core/management/color.py +++ b/django/core/management/color.py @@ -13,7 +13,13 @@ try: # Avoid initializing colorama in non-Windows platforms. colorama.just_fix_windows_console() -except (ImportError, OSError): +except ( + AttributeError, # colorama <= 0.4.6. + ImportError, # colorama is not installed. + # If just_fix_windows_console() accesses sys.stdout with + # WSGIRestrictedStdout. + OSError, +): HAS_COLORAMA = False else: HAS_COLORAMA = True |
