Skip to content
Discussion options

You must be logged in to vote

After reading NetworkManager documentation I realized that the agent is not required to obtain any D-Bus names.

So I fixed your code and added example of overriding the agent methods:

from __future__ importannotationsfromasyncioimportnew_event_loopfromtypingimportAnyimportsdbusfromsdbus_async.networkmanagerimport (
NetworkManagerSecretAgentInterfaceAsync,
NetworkManagerAgentManager,
NetworkManagerConnectionProperties,
)
sdbus.set_default_bus(sdbus.sd_bus_open_system())
classMySecretAgent(NetworkManagerSecretAgentInterfaceAsync):
@sdbus.dbus_method_async_override()asyncdefget_secrets(
self,
connection: NetworkManagerConnectionPrope…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@benjamin-grzimek
Comment options

@igo95862
Comment options

Answer selected bybenjamin-grzimek
@igo95862
Comment options

@benjamin-grzimek
Comment options

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@benjamin-grzimek@igo95862