python: make dbus, gi examples, and debug-helper.py python3 ready

https://bugzilla.gnome.org/show_bug.cgi?id=791121
This commit is contained in:
Yifan J
2017-12-02 12:44:50 +08:00
committed by Thomas Haller
parent 5e239d2c04
commit 797d9c4403
25 changed files with 104 additions and 104 deletions

View File

@@ -20,7 +20,7 @@
import dbus, uuid
def path_to_value(path):
return dbus.ByteArray("file://" + path + "\0")
return dbus.ByteArray("file://".encode("utf-8") + path.encode("utf-8") + "\0".encode("utf-8"))
s_con = dbus.Dictionary({
'type': '802-11-wireless',
@@ -28,7 +28,7 @@ s_con = dbus.Dictionary({
'id': 'My Wifi'})
s_wifi = dbus.Dictionary({
'ssid': dbus.ByteArray("homewifi"),
'ssid': dbus.ByteArray("homewifi".encode("utf-8")),
'security': '802-11-wireless-security'})
s_wsec = dbus.Dictionary({'key-mgmt': 'wpa-eap'})