mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
fix imports in crayons
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user