mirror of
https://github.com/gryf/wicd.git
synced 2026-01-09 07:14:13 +01:00
Fix "TypeError: sorted expected 1 arguments, got 2"
This commit is contained in:
@@ -38,6 +38,7 @@ import time
|
|||||||
import dbus
|
import dbus
|
||||||
import socket, fcntl
|
import socket, fcntl
|
||||||
import shutil
|
import shutil
|
||||||
|
from functools import cmp_to_key
|
||||||
|
|
||||||
from . import wpath
|
from . import wpath
|
||||||
from . import misc
|
from . import misc
|
||||||
@@ -1444,7 +1445,7 @@ class BaseWirelessInterface(BaseInterface):
|
|||||||
m = re.findall(bitrates_pattern, bitrates)
|
m = re.findall(bitrates_pattern, bitrates)
|
||||||
if m:
|
if m:
|
||||||
# numeric sort
|
# numeric sort
|
||||||
ap['bitrates'] = sorted(m, lambda x, y: int(float(x) - float(y)))
|
ap['bitrates'] = sorted(m, key=cmp_to_key(lambda x, y: int(float(x) - float(y))))
|
||||||
else:
|
else:
|
||||||
ap['bitrates'] = None
|
ap['bitrates'] = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user