diff --git a/wicd/wnettools.py b/wicd/wnettools.py index bfa290b..cb9d125 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -38,6 +38,7 @@ class BaseWirelessInterface() -- Control a wireless network interface. import dbus import socket, fcntl import shutil +from functools import cmp_to_key from . import wpath from . import misc @@ -1444,7 +1445,7 @@ def _ParseAccessPoint(self, cell, ralink_info): 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