Simplify NO_COLOR check

This commit is contained in:
Edgar Geier
2019-07-22 20:09:32 +02:00
parent 8520455042
commit e9ff1be96c

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 and os.environ['NO_COLOR']:
if os.environ.get('NO_COLOR'):
return False
return (