1
0
Fork 0

wordreference: fix crash if no colorama available

This commit is contained in:
dece 2022-01-17 09:57:57 +01:00
parent 0403549897
commit 1c1c29942e

View file

@ -71,13 +71,13 @@ def main():
args = ap.parse_args()
global Fore, Style
if args.no_color and HAS_COLORAMA:
Fore = DummyColorama()
Style = DummyColorama()
else:
if HAS_COLORAMA and not args.no_color:
Fore = colorama.Fore
Style = colorama.Style
colorama.init()
else:
Fore = DummyColorama()
Style = DummyColorama()
lang = args.lang
words = " ".join(args.words)