Require NO_COLOR environment variable to be non-empty to disable colors

This commit is contained in:
Edgar Geier
2019-07-22 19:35:39 +02:00
parent 1bf9ff7493
commit 01d3a72a0e

View File

@@ -48,7 +48,7 @@ def use_color(setting):
if setting not in COLOR_CHOICES:
raise InvalidColorSetting(setting)
if 'NO_COLOR' in os.environ:
if 'NO_COLOR' in os.environ and os.environ['NO_COLOR']:
return False
return (