diff options
| author | Michael Biebl <biebl@debian.org> | 2018-04-23 18:00:21 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-04-23 18:00:21 +0200 |
| commit | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (patch) | |
| tree | 2dd55c4ab0fdcbe9cddb26adb4a554b1a45c73c8 /examples/python/dbus/wifi-hotspot.py | |
| parent | 7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (diff) | |
New upstream version 1.11.3 upstream/1.11.3
Diffstat (limited to 'examples/python/dbus/wifi-hotspot.py')
| -rwxr-xr-x | examples/python/dbus/wifi-hotspot.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/python/dbus/wifi-hotspot.py b/examples/python/dbus/wifi-hotspot.py index 10958af8..9b057a2c 100755 --- a/examples/python/dbus/wifi-hotspot.py +++ b/examples/python/dbus/wifi-hotspot.py @@ -34,7 +34,7 @@ s_con = dbus.Dictionary({ 'id': 'Test Hotspot'}) s_wifi = dbus.Dictionary({ - 'ssid': dbus.ByteArray("My Hotspot"), + 'ssid': dbus.ByteArray("My Hotspot".encode("utf-8")), 'mode': "ap", 'band': "bg", 'channel': dbus.UInt32(1)}) @@ -54,8 +54,8 @@ con = dbus.Dictionary({ 'ipv6': s_ip6 }) -def usage(): - print "Usage: %s <ifname> [up|down]" % sys.argv[0] +def usage(): + print("Usage: %s <ifname> [up|down]" % sys.argv[0]) sys.exit(0) bus = dbus.SystemBus() @@ -99,10 +99,10 @@ if operation == "up": while time.time() < start + 10: state = active_props.Get("org.freedesktop.NetworkManager.Connection.Active", "State") if state == 2: # NM_ACTIVE_CONNECTION_STATE_ACTIVATED - print "Access point started" + print("Access point started") sys.exit(0) time.sleep(1) - print "Failed to start access point" + print("Failed to start access point") elif operation == "down": device.Disconnect() else: |