firecat53 / networkmanager-dmenu

Control NetworkManager via dmenu
MIT License
783 stars 74 forks source link

Deactivating connection raises TypeError #92

Closed The-Compiler closed 3 years ago

The-Compiler commented 3 years ago

When I want to deactivate an existing connection, I get:

Traceback (most recent call last):
  File "networkmanager_dmenu", line 814, in <module>
    run()
  File "networkmanager_dmenu", line 810, in run
    sel()
  File "networkmanager_dmenu", line 262, in __call__
    self.func(*self.args)
  File "networkmanager_dmenu", line 268, in process_ap
    CLIENT.deactivate_connection_async(nm_ap, None, deactivate_cb, nm_ap)
TypeError: Argument 1 does not allow None as a value
firecat53 commented 3 years ago

Does this happen for all connections or just a particular one? I don't see that for the Wifi or VPN connections that I use.

The-Compiler commented 3 years ago

Ah, this might actually be the same underlying cause as #91 (I'm trying with the eduroam connection from there):

firecat53 commented 3 years ago

Aha! The method you wrote for #93 works perfectly to fix this issue as well when applied to creating the list of current connections in create_ap_list(). Let me know if the devel branch works for you now.

firecat53 commented 3 years ago

I went ahead and closed this. Reopen or let me know if it doesn't work for you. Thanks!