diff options
| author | Michael Biebl <biebl@debian.org> | 2018-06-04 00:07:45 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-06-04 00:07:45 +0200 |
| commit | 04bc9e1cd3544445d883ad29ea108c1645c8e7b7 (patch) | |
| tree | d10c354b1b980ca8a7b9e48ec9019e8ed88bde2b /examples/python/dbus/wifi-hotspot.py | |
| parent | ee9c73a923909e23a649407be77e25235d769e25 (diff) | |
New upstream version 1.11.4 upstream/1.11.4
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: |