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:
@@ -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 []
|
||||
|
||||
Reference in New Issue
Block a user