From 4a773c2cde90109ce540f051e2ea49a2be3a600d Mon Sep 17 00:00:00 2001 From: Pila Date: Mon, 12 Jan 2026 21:34:27 +0100 Subject: [PATCH 1/2] Fix USB speed display --- usr/lib/linuxmint/mintreport/usb.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr/lib/linuxmint/mintreport/usb.py b/usr/lib/linuxmint/mintreport/usb.py index 6d70739..8598df4 100644 --- a/usr/lib/linuxmint/mintreport/usb.py +++ b/usr/lib/linuxmint/mintreport/usb.py @@ -32,13 +32,14 @@ def decode_power(device): def speed_label(speed_mbps): try: - val = int(speed_mbps) + val = float(speed_mbps) except Exception: return speed_mbps + if val >= 10000: - return _("%d Gbps") % val + return _("%s Gbps") % ("%d" % (val / 1000)) else: - return _("%d Mbps") % val + return _("%s Mbps") % speed_mbps def usb_limit(version): try: From a1ede3f47556ce10d5d53a2664b4743fae5c9fe1 Mon Sep 17 00:00:00 2001 From: Pila Date: Mon, 16 Feb 2026 21:10:45 +0100 Subject: [PATCH 2/2] Fix Gbps string --- usr/lib/linuxmint/mintreport/usb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintreport/usb.py b/usr/lib/linuxmint/mintreport/usb.py index 8598df4..f92053c 100644 --- a/usr/lib/linuxmint/mintreport/usb.py +++ b/usr/lib/linuxmint/mintreport/usb.py @@ -37,7 +37,7 @@ def speed_label(speed_mbps): return speed_mbps if val >= 10000: - return _("%s Gbps") % ("%d" % (val / 1000)) + return _("%d Gbps") % (val / 1000) else: return _("%s Mbps") % speed_mbps