diff options
| author | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
| commit | ee9c73a923909e23a649407be77e25235d769e25 (patch) | |
| tree | e21c923621fa278e737da693df9eb60ea31a6067 /examples/python/dbus/wifi-hotspot.py | |
| parent | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff) | |
New upstream version 1.10.8 upstream/1.10.8
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: |