fix imports in crayons

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-26 10:37:56 -04:00
parent 955dbd1451
commit 99d5fd5a4c
+2 -3
View File
@@ -12,10 +12,10 @@ import os
import re
import sys
PY3 = sys.version_info[0] >= 3
import colorama
PY3 = sys.version_info[0] >= 3
__all__ = (
'red', 'green', 'yellow', 'blue',
'black', 'magenta', 'cyan', 'white',
@@ -70,7 +70,6 @@ class ColoredString(object):
c = '%s%s%s%s%s' % (getattr(colorama.Fore, self.color), getattr(colorama.Style, style), self.s, colorama.Fore.RESET, getattr(colorama.Style, 'NORMAL'))
if self.always_color:
print(self.always_color)
return c
elif sys.stdout.isatty() and not DISABLE_COLOR:
return c