fix my sanity when logging in
This commit is contained in:
parent
069bee78ca
commit
3c38e550db
@ -103,7 +103,8 @@ def handle_disconnect(args: argparse.Namespace) -> int:
|
||||
# Disconnect from Guru VPN
|
||||
print("Bringing down Guru VPN")
|
||||
result = subprocess.run(["nmcli", "connection", "down", "Guru VPN"])
|
||||
return result.returncode
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
def main() -> int:
|
||||
@ -131,9 +132,8 @@ def main() -> int:
|
||||
|
||||
# Handle subcommands
|
||||
cmd_fns = {
|
||||
"connect": handle_connect,
|
||||
"connect": lambda args: handle_disconnect(args) or handle_connect(args),
|
||||
"disconnect": handle_disconnect,
|
||||
"reconnect": lambda args: handle_disconnect(args) or handle_connect(args),
|
||||
}
|
||||
return cmd_fns[args.operation](args)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user