diff options
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 9b057a2c..10958af8 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".encode("utf-8")), + 'ssid': dbus.ByteArray("My Hotspot"), '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: |