Skip to content

Commit

Permalink
Refs #34768 -- Ignored lack of just_fix_windows_console() for coloram…
Browse files Browse the repository at this point in the history
…a < 0.4.6.
  • Loading branch information
felixxm authored Sep 3, 2023
1 parent bcd80de commit 048d75a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion django/core/management/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

# 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
Expand Down

0 comments on commit 048d75a

Please sign in to comment.