We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1497c59 commit c755662Copy full SHA for c755662
pythonforandroid/toolchain.py
@@ -41,7 +41,16 @@
41
import argparse
42
from appdirs import user_data_dir
43
import sh
44
-from colorama import Style, Fore
+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()
54
55
user_dir = dirname(realpath(os.path.curdir))
56
toolchain_dir = dirname(__file__)
0 commit comments