Skip to content

Commit aa5bed1

Browse files
pilatomicclefebvre
authored andcommitted
Fix usb speed display (#114)
* Fix USB speed display * Fix Gbps string
1 parent b379e09 commit aa5bed1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • usr/lib/linuxmint/mintreport

usr/lib/linuxmint/mintreport/usb.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ def decode_power(device):
3232

3333
def speed_label(speed_mbps):
3434
try:
35-
val = int(speed_mbps)
35+
val = float(speed_mbps)
3636
except Exception:
3737
return speed_mbps
38+
3839
if val >= 10000:
39-
return _("%d Gbps") % val
40+
return _("%d Gbps") % (val / 1000)
4041
else:
41-
return _("%d Mbps") % val
42+
return _("%s Mbps") % speed_mbps
4243

4344
def usb_limit(version):
4445
try:

0 commit comments

Comments
 (0)