mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
tools: ratbagctl: fix 'set' processing when the device is missing
is it a hack or the correct way? triggered by: sudo ./build/ratbagctl.devel led 0 set color ffffff Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -1213,6 +1213,9 @@ class RatbagParserSet(RatbagParserSwitch):
|
||||
e.parse(subs, input_string, ns)
|
||||
if len(input_string) == 3:
|
||||
self.store_function(parser)
|
||||
elif len(input_string) == 2:
|
||||
# missing device argument
|
||||
parser.add_argument("device", metavar='eventX')
|
||||
else:
|
||||
parser.set_defaults(subparse=self.sub_parse)
|
||||
return parser
|
||||
|
||||
Reference in New Issue
Block a user