Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Fix "TypeError: cmp is an invalid keyword argument for sort()"
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaran committed Sep 10, 2019
1 parent c2789eb commit 9587c52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wicd/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class WiredConnectThread() -- Connection thread for wired
import threading
import os
from signal import SIGTERM
from functools import cmp_to_key

# wicd imports
from . import misc
Expand Down Expand Up @@ -663,7 +664,7 @@ def comp(x, y):
time.sleep(1)

aps = wiface.GetNetworks(essid)
aps.sort(cmp=comp, reverse=True)
aps.sort(key=cmp_to_key(comp), reverse=True)

return aps

Expand Down

0 comments on commit 9587c52

Please sign in to comment.