From adc8d9b712cf4322d7fadaee73b220e50c6f88fb Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Tue, 15 Aug 2017 13:15:39 +0200 Subject: [PATCH] RatbagdButton: add ACTION_SPECIAL_UNKNOWN to SPECIAL_DESCRIPTION This prevents crashing when a device reports an unknown special action type to libratbag, see e.g. #120. --- piper/ratbagd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/piper/ratbagd.py b/piper/ratbagd.py index 3c249ce..6ecc6c2 100644 --- a/piper/ratbagd.py +++ b/piper/ratbagd.py @@ -593,6 +593,7 @@ class RatbagdButton(_RatbagdDBus): """A table mapping a special function to its human-readable description.""" SPECIAL_DESCRIPTION = { + ACTION_SPECIAL_UNKNOWN: _("Unknown"), ACTION_SPECIAL_DOUBLECLICK: _("Doubleclick"), ACTION_SPECIAL_WHEEL_LEFT: _("Wheel Left"), ACTION_SPECIAL_WHEEL_RIGHT: _("Wheel Right"),