mirror of
https://github.com/gryf/wicd.git
synced 2025-12-24 15:12:31 +01:00
Fix "TypeError: sorted expected 1 arguments, got 2"
This commit is contained in:
@@ -38,6 +38,7 @@ import time
|
||||
import dbus
|
||||
import socket, fcntl
|
||||
import shutil
|
||||
from functools import cmp_to_key
|
||||
|
||||
from . import wpath
|
||||
from . import misc
|
||||
@@ -1444,7 +1445,7 @@ class BaseWirelessInterface(BaseInterface):
|
||||
m = re.findall(bitrates_pattern, bitrates)
|
||||
if m:
|
||||
# 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:
|
||||
ap['bitrates'] = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user