about summary refs log tree commit diff
path: root/examples/python/dbus/vpn.py
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-05-11 22:08:45 +0200
committerMichael Biebl <biebl@debian.org>2018-05-11 22:08:45 +0200
commitee9c73a923909e23a649407be77e25235d769e25 (patch)
treee21c923621fa278e737da693df9eb60ea31a6067 /examples/python/dbus/vpn.py
parentf60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff)
New upstream version 1.10.8 upstream/1.10.8
Diffstat (limited to 'examples/python/dbus/vpn.py')
-rwxr-xr-xexamples/python/dbus/vpn.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/python/dbus/vpn.py b/examples/python/dbus/vpn.py
index a21b82ff..d60e470e 100755
--- a/examples/python/dbus/vpn.py
+++ b/examples/python/dbus/vpn.py
@@ -61,7 +61,7 @@ def list_uuids():
         iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager.Settings.Connection')
         settings = iface.GetSettings()
         conn = settings['connection']
-        print("%s - %s (%s)" % (conn['uuid'], conn['id'], conn['type']))
+        print "%s - %s (%s)" % (conn['uuid'], conn['id'], conn['type'])
 
 
 def get_active_connection_path(uuid):
@@ -102,7 +102,7 @@ def get_wifi_device_path():
 def activate_connection(connection_path, device_path):
 
     def reply_handler(opath):
-        print("Success: device activating")
+        print "Success: device activating"
         sys.exit(0)
 
     def error_handler(*args):
@@ -114,7 +114,7 @@ def activate_connection(connection_path, device_path):
     iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager')
     iface.ActivateConnection('org.freedesktop.NetworkManager',
                              connection_path,
-                             device_path,
+                             device_path, 
                              "/",
                              reply_handler=reply_handler,
                              error_handler=error_handler)
@@ -126,26 +126,26 @@ if UID != 0:
 
 # Are we configured?
 if not len(CONNECTION_UUID):
-    print("missing connection UUID")
+    print "missing connection UUID"
     sys.exit(0)
 
 connection_path = get_connection_by_uuid(CONNECTION_UUID)
 if not connection_path:
     # Configured VPN connection is not known to NM, check CONNECTION_UUID.
-    print("couldn't find the connection")
+    print "couldn't find the connection"
     sys.exit(1)
 
 device_path = get_wifi_device_path()
 if not device_path:
-    print("no wifi device found")
+    print "no wifi device found"
     sys.exit(1)
 
 # Is it already activated?
 if get_active_connection_path(CONNECTION_UUID):
-    print("already connected")
+    print "already connected"
     sys.exit(0)
 
-print("Activating connection...")
+print "Activating connection..."
 activate_connection(connection_path, device_path)
 loop = gobject.MainLoop()
 loop.run()