Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding bus.get_interface() shortcut #128

Open
yurac opened this issue Aug 3, 2022 · 0 comments
Open

Consider adding bus.get_interface() shortcut #128

yurac opened this issue Aug 3, 2022 · 0 comments

Comments

@yurac
Copy link

yurac commented Aug 3, 2022

Seems that the following pattern repeats frequently:

  1. Get introspection
  2. Get proxy object
  3. Get interface

Is it possible to have a shortcut for this? Something like:

Class MessageBus:
    async def get_interface(self, name, path, interface):                                                               
        introspection = await self.introspect(name, path)                                                                    
        proxy = bus.get_proxy_object(name, path, introspection)                                                             
        return proxy.get_interface(interface)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant