diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-09-29 04:18:10 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-09-29 04:50:04 -0400 |
commit | 2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12 (patch) | |
tree | 8d477129f6e4d7d2d456a446bbd264da308e4dec /src/monitor.py | |
parent | 2664452360c58e3b4b26de17627c7c5abfbd90ce (diff) | |
download | net_monitor-2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12.tar net_monitor-2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12.tar.gz net_monitor-2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12.tar.bz2 net_monitor-2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12.tar.xz net_monitor-2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12.zip |
fix "ord() expected string of length 1, but int found"
MAC adress was no more fetched since switching to python3
Diffstat (limited to 'src/monitor.py')
-rw-r--r-- | src/monitor.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |