1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-24 15:12:31 +01:00

Fix "NameError: name 'cmp' is not defined"

Source: https://codegolf.stackexchange.com/questions/49778/how-can-i-use-cmpa-b-with-python3

Now the wicd daemon starts as "/usr/sbin/wicd -c -f -e -o" wihout
errors, only warnings are left.

wicd-curses also runs but spews warnings into the status line, too.
This commit is contained in:
Axel Beckert
2019-09-11 01:40:43 +02:00
parent 9587c52c88
commit c238d26a9e

View File

@@ -644,7 +644,8 @@ class Wireless(Controller):
key = 'quality'
else:
key = 'strength'
return cmp(x[key], y[key])
return ((x[key] > y[key]) - (x[key] < y[key])) # cmp(x[key], y[key])
if not self.wiface:
return []