Changes between Initial Version and Version 1 of Ticket #13476, comment 13
- Timestamp:
- Nov 15, 2013, 6:27:51 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13476, comment 13
initial v1 8 8 {{{ 9 9 diff --git a/django/core/management/color.py b/django/core/management/color.py 10 index c322614..4276c7d 10064410 index 20e31ff..4276c7d 100644 11 11 --- a/django/core/management/color.py 12 12 +++ b/django/core/management/color.py 13 @@ -14,10 +14,10 @@ def supports_color(): 13 @@ -13,10 +13,11 @@ def supports_color(): 14 Returns True if the running system's terminal supports color, and False 14 15 otherwise. 15 16 """ 16 plat = sys.platform 17 - unsupported_platform = plat == 'Pocket PC' or plat == 'win32' and 'ANSICON' not in os.environ 17 - unsupported_platform = (sys.platform in ('win32', 'Pocket PC')) 18 + plat = sys.platform 18 19 + supported_platform = plat != 'Pocket PC' and (plat != 'win32' or 'ANSICON' in os.environ) 19 20 # isatty is not always implemented, #6223.