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() args = ap.parse_args()
global Fore, Style global Fore, Style
if args.no_color and HAS_COLORAMA: if HAS_COLORAMA and not args.no_color:
Fore = DummyColorama()
Style = DummyColorama()
else:
Fore = colorama.Fore Fore = colorama.Fore
Style = colorama.Style Style = colorama.Style
colorama.init() colorama.init()
else:
Fore = DummyColorama()
Style = DummyColorama()
lang = args.lang lang = args.lang
words = " ".join(args.words) words = " ".join(args.words)