cli/config: wrap argv in list for Gio.Application.run (PyGObject 3.56)
The remote-config path passes a yaml.dump(...) string to Gio.Application.run(), whose argv parameter is Optional[list[str]]. Pre-3.56 PyGObject tolerated a bare str; the marshaller refactor in the 3.55 dev series (MR !487) tightened this, and 3.56 now raises TypeError: Unable to marshal str as an array. Wrap the YAML string in a 1-element list. The receiver in solaar.ui._command_line already does yaml.safe_load("".join(args)) on the argv, so a 1-element argv reconstructs the original YAML cleanly under both old and new PyGObject.
This commit is contained in:
parent
7647cea478
commit
f68230b83d
|
|
@ -231,7 +231,7 @@ def run(receivers, args, _find_receiver, find_device):
|
|||
argl = ["config", dev.serial or dev.unitId, setting.name]
|
||||
argl.extend([a for a in [args.value_key, args.extra_subkey, args.extra2] if a is not None])
|
||||
args = yaml.dump(argl)
|
||||
application.run(args)
|
||||
application.run([args])
|
||||
else:
|
||||
if dev.persister and setting.persist:
|
||||
dev.persister[setting.name] = setting._value
|
||||
|
|
|
|||
Loading…
Reference in New Issue