Skip to content
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 41
41
import argparse
42
42
from appdirs import user_data_dir
43
43
import sh
44
- from colorama import Style , Fore
44
+ if sys .stdout .isatty ():
45
+ from colorama import Style , Fore
46
+ else :
47
+ from collections import defaultdict
48
+ class colorama_shim (object ):
49
+ def __init__ (self ):
50
+ self ._dict = defaultdict (str )
51
+ def __getattr__ (self , key ):
52
+ return self ._dict [key ]
53
+ Style = Fore = colorama_shim ()
45
54
46
55
user_dir = dirname (realpath (os .path .curdir ))
47
56
toolchain_dir = dirname (__file__ )
You can’t perform that action at this time.
0 commit comments