We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3a979c commit 079ebfeCopy full SHA for 079ebfe
1 file changed
NetworkManager.py
@@ -229,6 +229,8 @@ class AccessPoint(NMDbusInterface):
229
def postprocess(self, name, val):
230
if name == 'Ssid':
231
return fixups.ssid_to_python(val)
232
+ elif name == 'Strength':
233
+ return fixups.strength_to_python(val)
234
return val
235
236
class Wired(NMDbusInterface):
@@ -330,6 +332,10 @@ def ssid_to_dbus(ssid):
330
332
ssid = ssid.encode('utf-8')
331
333
return [dbus.Byte(x) for x in ssid]
334
335
+ @staticmethod
336
+ def strength_to_python(strength):
337
+ return struct.unpack('B', strength)[0]
338
+
339
@staticmethod
340
def mac_to_python(mac):
341
return "%02X:%02X:%02X:%02X:%02X:%02X" % tuple([ord(x) for x in mac])
0 commit comments