jp: default to "dark" if background is not set and can't be detected

This commit is contained in:
Goffi 2019-10-03 22:17:19 +02:00
commit 4e9b0f0d54

View file

@ -131,9 +131,9 @@ class Jp(object):
for c in expected:
ch = sys.stdin.read(1)
if ch != c:
# background id is not supported
# background id is not supported, we default to "dark"
# TODO: log something?
return
return 'dark'
red, green, blue = [int(c, 16)/65535 for c in sys.stdin.read(14).split('/')]
# '\a' is the last character
sys.stdin.read(1)