From 2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 29 Sep 2015 04:18:10 -0400 Subject: fix "ord() expected string of length 1, but int found" MAC adress was no more fetched since switching to python3 --- src/monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monitor.py b/src/monitor.py index 78d6b4b..180e33b 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -195,7 +195,7 @@ class Monitor: # mac address try: mac_struct=self.ioctl(0x8927, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[18:24] - mac=":".join(["%02x" % ord(char) for char in mac_struct]) + mac=":".join(["%02x" % ord(chr(char)) for char in mac_struct]) except: addr=_("No address assigned") # addr, mac -- cgit v1.2.1