Mageia Bugzilla – Attachment 7070 Details for
Bug 16845
network monitor does not display graph of traffic data (python3 regression)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
fix "ord() expected string of length 1, but int found"
0004-fix-ord-expected-string-of-length-1-but-int-found.patch (text/plain), 897 bytes, created by
Thierry Vignaud
on 2015-09-29 10:51:44 CEST
(
hide
)
Description:
fix "ord() expected string of length 1, but int found"
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-09-29 10:51:44 CEST
Size:
897 bytes
patch
obsolete
>From 2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12 Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Tue, 29 Sep 2015 04:18:10 -0400 >Subject: [PATCH 4/5] 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 >-- >2.5.3 >
From 2c64c9ba3472dcd640e6adc15a42ac08ffa1ad12 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Tue, 29 Sep 2015 04:18:10 -0400 Subject: [PATCH 4/5] 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 -- 2.5.3
View Attachment As Raw
Actions:
View
Attachments on
bug 16845
:
7060
|
7065
|
7066
|
7067
|
7068
|
7069
| 7070 |
7073