1
0
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:
Axel Beckert
2019-09-11 01:29:07 +02:00
parent fef2a43a59
commit c2789eb467

View File

@@ -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