Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WoeUSB/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
try:
import termcolor
except ImportError:
termcolor = None
print("Module termcolor is not installed, text coloring disabled")
no_color = True

gui = None
verbose = False
Expand Down Expand Up @@ -289,7 +289,7 @@ def print_with_color(text, color=""):
gui.error = text
sys.exit()
else:
if no_color or color == "":
if no_color or color == "" or termcolor is None:
sys.stdout.write(text + "\n")
else:
termcolor.cprint(text, color)
Expand Down