test has_colors() before COLORS

This commit is contained in:
troido 2018-05-23 21:08:52 +02:00
parent a26f068e13
commit 2ae5a8ef8a
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class Display:
def __init__(self, stdscr, charMap, colours=False):
if colours and curses.COLORS > 0:
if colours and curses.has_colors and curses.COLORS > 1:
self.colours = Colours()
else:
self.colours = None