diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-01-11 17:41:24 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-01-11 17:41:24 +0100 |
| commit | a82e048a943092315a32d745c99e0f5635e29134 (patch) | |
| tree | e2daea99a161768c9b956bfea9117289deaf31be /examples/python/dbus/vpn.py | |
| parent | b51f06ff71a2060925bf3c0f04c44bd12480e670 (diff) | |
| parent | 65f86e8f56267192d42f2b629fc6b0c99fb9cd0c (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
Diffstat (limited to 'examples/python/dbus/vpn.py')
| -rwxr-xr-x | examples/python/dbus/vpn.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/python/dbus/vpn.py b/examples/python/dbus/vpn.py index ed381372..814e4415 100755 --- a/examples/python/dbus/vpn.py +++ b/examples/python/dbus/vpn.py @@ -8,17 +8,15 @@ # Run this script without any arguments to list the available connection uuids. # The uuid of the connection to activate -CONNECTION_UUID = "ac6dc9b2-85ef-4311-83d8-add5d7db3f59" +CONNECTION_UUID = "c08142a4-00d9-45bd-a3b1-7610fe146374" # UID to use. Note that NM only allows the owner of the connection to activate it. # UID=1000 UID = 0 -import sys -import os -import dbus +import sys, os, dbus from dbus.mainloop.glib import DBusGMainLoop -import gobject +from gi.repository import GLib DBusGMainLoop(set_as_default=True) @@ -156,5 +154,5 @@ if get_active_connection_path(CONNECTION_UUID): print("Activating connection...") activate_connection(connection_path, device_path) -loop = gobject.MainLoop() +loop = GLib.MainLoop() loop.run() |