Mageia Bugzilla – Attachment 7068 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
[patch]
fix "ord() expected string of length 1, but int found"
0004-fix-ord-expected-string-of-length-1-but-int-found.patch (text/plain), 948 bytes, created by
Thierry Vignaud
on 2015-09-29 10:42:56 CEST
(
hide
)
Description:
fix "ord() expected string of length 1, but int found"
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-09-29 10:42:56 CEST
Size:
948 bytes
patch
obsolete
>From 29f82cf731c1217d8b06bbf02c1ac939d9d29677 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..04829d1 100644 >--- a/src/monitor.py >+++ b/src/monitor.py >@@ -194,7 +194,7 @@ class Monitor: > addr=_("No address assigned") > # mac address > try: >- mac_struct=self.ioctl(0x8927, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[18:24] >+ mac_struct=str(self.ioctl(0x8927, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[18:24]) > mac=":".join(["%02x" % ord(char) for char in mac_struct]) > except: > addr=_("No address assigned") >-- >2.5.3 >
From 29f82cf731c1217d8b06bbf02c1ac939d9d29677 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..04829d1 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -194,7 +194,7 @@ class Monitor: addr=_("No address assigned") # mac address try: - mac_struct=self.ioctl(0x8927, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[18:24] + mac_struct=str(self.ioctl(0x8927, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[18:24]) mac=":".join(["%02x" % ord(char) for char in mac_struct]) except: addr=_("No address assigned") -- 2.5.3
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16845
:
7060
|
7065
|
7066
|
7067
|
7068
|
7069
|
7070
|
7073