feat(cli): Add get_properties helper function for DBus interactions
This function facilitates retrieving specific properties from a DBus interface, improving code modularity and reusability. It supports both system and session bus types, streamlining access to DBus resources.
This commit is contained in:
@@ -29,6 +29,11 @@ def setup_command_line_arguments():
|
|||||||
help="RevPi PiControl object",
|
help="RevPi PiControl object",
|
||||||
)
|
)
|
||||||
cli_picontrol.add_subparsers(obj_picontrol)
|
cli_picontrol.add_subparsers(obj_picontrol)
|
||||||
|
obj_config = rpictl_obj.add_parser(
|
||||||
|
"config",
|
||||||
|
help="RevPi configuration object (revpi-config)",
|
||||||
|
)
|
||||||
|
cli_config.add_subparsers(obj_config)
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
def main() -> int:
|
||||||
@@ -39,6 +44,9 @@ def main() -> int:
|
|||||||
if obj == "picontrol":
|
if obj == "picontrol":
|
||||||
rc = cli_picontrol.main()
|
rc = cli_picontrol.main()
|
||||||
|
|
||||||
|
elif obj == "config":
|
||||||
|
rc = cli_config.main()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.error(f"Unknown object: {obj}")
|
log.error(f"Unknown object: {obj}")
|
||||||
rc = 1
|
rc = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user