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/add-connection-compat.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/add-connection-compat.py')
| -rwxr-xr-x | examples/python/dbus/add-connection-compat.py | 9 |
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() |