about summary refs log tree commit diff
path: root/examples/python/dbus/add-connection-compat.py
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-10-05 22:28:16 +0200
committerMichael Biebl <biebl@debian.org>2020-10-05 22:28:16 +0200
commit47a2114d6f697a31d84c8874c49e94dd04119d75 (patch)
treee3022686ff1956d7f17f1f7cdf7022ce980b7a5c /examples/python/dbus/add-connection-compat.py
parent9d722f3d3492e31c0b3e4bcba603ffd65309c621 (diff)
parentaafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (diff)
Update upstream source from tag 'upstream/1.27.90'
Update to upstream version '1.27.90'
with Debian dir 72a0791efa5966be1724a82dfcac90f6cd22bd1b
Diffstat (limited to 'examples/python/dbus/add-connection-compat.py')
-rwxr-xr-xexamples/python/dbus/add-connection-compat.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/python/dbus/add-connection-compat.py b/examples/python/dbus/add-connection-compat.py
index 6acec734..2661eccb 100755
--- a/examples/python/dbus/add-connection-compat.py
+++ b/examples/python/dbus/add-connection-compat.py
@@ -16,16 +16,14 @@
 
 import socket, struct, dbus, uuid
 
-# Helper functions
+
 def ip_to_int(ip_string):
     return struct.unpack("=I", socket.inet_aton(ip_string))[0]
 
 
-def int_to_ip(ip_int):
-    return socket.inet_ntoa(struct.pack("=I", ip_int))
-
-
+# full duplex
 s_wired = dbus.Dictionary({"duplex": "full"})
+
 s_con = dbus.Dictionary(
     {"type": "802-3-ethernet", "uuid": str(uuid.uuid4()), "id": "MyConnectionExample"}
 )
@@ -47,7 +45,6 @@ con = dbus.Dictionary(
     {"802-3-ethernet": s_wired, "connection": s_con, "ipv4": s_ip4, "ipv6": s_ip6}
 )
 
-
 print("Creating connection:", s_con["id"], "-", s_con["uuid"])
 
 bus = dbus.SystemBus()