mirror of
https://github.com/gryf/wicd.git
synced 2026-01-08 06:44:20 +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'
|
key = 'quality'
|
||||||
else:
|
else:
|
||||||
key = 'strength'
|
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:
|
if not self.wiface:
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user